按使用场景分组,点击"复制"按钮一键复制命令
git status
git add <file>
git add .
git commit -m "提交信息"
git commit --amend
git diff
git diff --cached
git branch -a
git branch <branch-name>
git checkout <branch-name>
git checkout -b <branch-name>
git merge <branch-name>
git branch -d <branch-name>
git push origin --delete <branch-name>
git checkout -- <file>
git reset HEAD <file>
git reset --soft HEAD^
git reset --hard HEAD^
git revert <commit-id>
git clone <url>
git pull origin <branch>
git push origin <branch>
git fetch origin
git log --oneline
git log --oneline --graph --all
git cherry-pick <commit-id>
git stash
git stash list
git stash pop
git stash drop
git tag
git tag -a <tag-name> -m "说明"
git push origin <tag-name>
git tag -d <tag-name>
git config --global user.name "你的名字"
git config --global user.email "you@example.com"
git config --list
git rm --cached <file>
git check-ignore <path>
git config --global core.quotepath false
git config --global i18n.commitencoding utf-8
git config --global i18n.logoutputencoding utf-8