git 将某一个文件回退到某个版本
查看该文件的log, 会打印出commit id, message等信息
git log $file
回退
git checkout $commit $file
git branch到另一个分支
git branch -a #查看当前git 所有分支
git checkout -b new remotes/origin/new #需要加-b 在local 建立一个分支
结果会是: HEAD -> new, origin/new
后面直接git pull, git push就行
也可以使用:
git pull origin new
git add
git comment -m ""
git push origin new
git&gerrit, 已经git push后再次递增修改
git add $file
git commit --amend -m "message" // 建议加上message
git push origin HEAD:refs/for/master
git diff $commit $commit $file
git reset --soft $commit
git reset --hard $commit
git stash
git stash pop
git reset HEAD $file
git checkout $file

被折叠的 条评论
为什么被折叠?



