黄舟2017-04-22 09:02:08
“想从b中还原a改过的内容”,如果是撤销分支合并操作,请尝试git reset/revert {commit}
可以先用git reflog
查看HEAD指针变更,比如:
de51e3d HEAD@{0}: merge nnn: Fast-forward
4430e82 HEAD@{1}: checkout: moving from nnn to master
de51e3d HEAD@{2}: commit: commit2
4430e82 HEAD@{3}: checkout: moving from master to nnn
4430e82 HEAD@{4}: commit (initial): test
然后比如git reset HEAD@{2}
返回某一次提交