分支
创建分支
git branch -b branchname
git push --set-upstream origin branchname
删除本地分支
git branch --delete branchname
删除远端分支
git push origin --delete branchname
其他
更改远端源
git remote set-url origin git@github.com:project/project.git
强制回退到某个版本
查看历史版本
git log --pretty=oneline
本地回退到某个版本
git reset --hard HEAD^ / 0123456789
强制提交
git push -f origin master / branchName
查看所有分支的所有操作记录
git reflog show --date=iso
可以查看所有分支的所有操作记录
包括commit和reset的操作
包括已经被删除的commit记录