Most Used Git Commands

git add .
git commit -m "<commit message>"
git push
git push --set-upstream origin <branchName>
git pull
git branch
git checkout <branchName>
git branch -d <branchName>
git rebase <branchName>
git merge <branchName>
git diff
git log

Create a new branch called <branchName>, then check out to that branch

git checkout -b <branchName>

Show file changes for commits

git log --name-only

Tag related commands

git tag <a.b.c>
git push origin <a.b.c>
git tag -d <a.b.c>
git push origin :refs/tags/<a.b.c>

Posted

in

by

Tags:

Comments

Leave a comment