Skip to the content.

Git Basics and Useful commands

Git Basics -

git config

git config –global user.name "MyName"

git config –global user.email "myname@mymail.com"

git init

git init [OR] git init \home\desktop\repoName

git clone

git clone https://github.com/SriSatyaLokesh/git-workshop

git add

git add README.md
git add .

git diff

git commit

git commit -m "Added README.md"

git reset

git status

git status

git rm

git rm README.md

git log

git log

git show

Branches -

Let’s start working with branches

Your image title

git branch

Colloboration with others -

Let’s colloborate with others using remote repos

Your image title

git remote

git add origin https://github.com/SriSatyaLokesh/git-workshop

git push

git pull https://github.com/SriSatyaLokesh/git-workshop

git stash and pop

Your image title

other commands

It’s not simple but it’s useful. But start using and practice, you’ll end up loving git

Your image title