推送tag到远端: git push origin tag名
删除远端tag: git push origin :refs/tags/tag名
推送本地branch到远端: git push origin branch名
删除远程分支:git push origin --delete branch名
比较A分支中有B分支没有的提交记录
git log [branchA] ^[branchB]
比较两个分支间所有变更的文件列表
git diff [branch1] [branch2] --stat
合并指定[fromBranch]的commit到[toBranch]
git checkout [toBranch]
git cherry-pick [commitid1]..[commitidn]
记住密码
git config --global credential.helper cache
清除本地缓存
git remote prune origin
显示详细改动记录日志
git log -p
查看所有分支的所有操作记录(包括提交、回退、已删除的提交操作记录等)
git reflog
解除本地与远程关联
git branch --unset-upstream
关联本地与远程分支
git branch --set-upstream-to=origin/ [远程分支名] [本地分支名]
修改上一次提交的用户名和Email
git commit --amend --author='[用户名] <[邮箱]>'