代码之家  ›  专栏  ›  技术社区  ›  netshark1000

git:撤消上次提交并返回到当前版本

  •  -2
  • netshark1000  · 技术社区  · 6 年前

    enter image description here

    1 回复  |  直到 5 年前
        1
  •  0
  •   Dharman Aman Gojariya    5 年前

    git checkout test~4 # go back to the revision _before_ the one you want to delete
    git cherry-pick test~3..test # cherry pick the revisions after the one you want to delete
    git branch -f test # move test pointer
    git checkout test # checkout test
    

    在这一点上,你的狗所做的应该从树枝上消失。

    推荐文章