Git Command Reference
Git Common command Quick Reference, Ctrl+F
git init |
New |
git clone <url> |
|
git config --global user.name "" |
|
git config --global user.email "" |
|
git config --list |
|
git status |
|
git add <file> |
|
git add -A |
|
git commit -m "msg" |
|
git commit -am "msg" |
+() |
git push |
|
git pull --rebase |
rebase |
git branch |
|
git branch <name> |
|
git switch <branch> |
(Git 2.23+) |
git switch -c <name> |
|
git branch -d <name> |
|
git branch -m <new> |
|
git merge <branch> |
|
git rebase <branch> |
|
git log --oneline |
|
git log --graph --all |
|
git log -p <file> |
|
git diff |
|
git diff --staged |
|
git blame <file> |
|
git reset HEAD <file> |
|
git restore <file> |
(Git 2.23+) |
git reset --soft HEAD~1 |
, |
git reset --hard HEAD~1 |
|
git revert <commit> |
() |
git stash |
|
git stash pop |
|
git remote -v |
|
git remote add <name> <url> |
|
git fetch |
New() |
git push -u origin <branch> |
|
git push origin --delete <branch> |
|
git tag v1.0.0 |
|
git tag -a v1.0.0 -m "msg" |
|
git push --tags |
|
git tag -d v1.0.0 |
|