Git - 恢复撤销
1、取消本地修改,恢复到上一次的 commit
commitgit reset --hard2、取消 git add 的文件
git add 的文件git reset HEAD xxxx3、取消对文件的修改
git checkout -- xxx4、取消已经提交的修改
git revert HEAD5、Tips
6. 取消已经 push 的行为(重建分支)
7. 取消已经 push 的行为(强制 PUSH)
Last updated