查看版本记录
git log
或 git log --stat
回退到指定版本
git reset --hard xxx
此时当前版本已经比远端版本落后了,因为已经回退到过去的版本,此时执行 git status 会提示说需要pull,是正常的
在将当前回退的版本强制提交到远端,覆盖掉远端的版本
git push -f
查看版本记录
git log
或 git log --stat
回退到指定版本
git reset --hard xxx
此时当前版本已经比远端版本落后了,因为已经回退到过去的版本,此时执行 git status 会提示说需要pull,是正常的
在将当前回退的版本强制提交到远端,覆盖掉远端的版本
git push -f
本文标题:git 版本回退
本文链接:https://www.haomeiwen.com/subject/zwbpxrtx.html
网友评论