#查看commit记录
git reflog
#撤销最新的commit记录
git reset commit-id
#撤销某次commit记录
git revert commit-id
#更新本地代码
git pull
#强制更新本地master分支代码
git fetch --all && git reset --hard origin/master && git pull
#清理untrack
git clean -f[-fd]
#git stash
git stash #保存本地修改
git stash pop #合并本地修改并删除该保存记录
git stash apply #默认合并记录@{0}
git stash apply stash@{1} #合并记录@{1}但不删除该记录
git stash show stash@{1} #查看@{1}做了什么修改
git stash --keep-index #只保存未add的记录
#git branch
git branch -a #查看所有分支
git branch -b 本地新分支 远端分支 #新建分支并命名该分支