git reset 和 git revert 有一明显区别:
git reset
git revert
git revert 指哪打哪,即 git revert <commit-hash> commit-hash 即为revert目标
git revert <commit-hash>
commit-hash
revert
而 git reset <commit-hash> 要操作的commit-hash 需要为目标hash上一个即更早commit的那个commit-hash
git reset <commit-hash>
hash
commit
最后更新于1年前