代码提交git远程仓库之后发现提交错了,需要回退
1、首先查看历史提交记录
git log
image.png
2、复制 正确提交的commitID,然后
:q
退出3、回退
git reset --hard commitID
4、强制提交
git push --force
代码提交git远程仓库之后发现提交错了,需要回退
1、首先查看历史提交记录
git log
:q
退出git reset --hard commitID
4、强制提交
git push --force