Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Git clone <URL>

Git config –global user.name <name>

Git config –global user.email <email>

Git config –list

Git status

Git log

Git push <fetch+merge>

Git reset head <file-name>

Git reset --soft <file-name>

Git reset --mixed <file-name>

Git stash list

Git stash save

Git stash pop

Git stash apply

Git stash drop <id>

Git tag –list

Git tag <name>

Git tag –d <tagname>

Git push <URL>

Git branch

Git branch <branchname>

Git branch -d

Git checkout

Git fetch = it will fetch the code and shows latest commit

Git branch -r = it shows all branches of remote repo

Git merge = merge branches (main$git merge<branch name>) it will merge code to main branch

Git rebase =
Git reset = it is used in local, it will remove our commit

Git revet = it is used in remote repo, the new commit will be added

You might also like