git status:查看当前分支状态
git diff:查看修改情况
git log:查看当前分支提交情况
git log | head -1 | awk '{print $2}':获取最新的提交id
git add . :添加修改到本地缓存
git commit -s:带说明的提交
git commit --amend:增量更新提交
git branch -r:查看全部分支
git checkout -t :切换分支
git pull --rebase:更新本地仓库
git reset --hard (change id):回退到某次提交时的状态
git log | head -1 | awk '{print $2}' | xargs git reset --hard:回退到最近一次提交
git cherry-pick:拉分支
git blame :查看某个文件的修改情况
git show (change id) 看某个change的提交信息