search

Home  >  Q&A  >  body text

javascript - Questions about git code rollback

For example, there are two branches, dev-a, dev-b;
Now merge the dev-a branch into the dev-b branch. After merging, I found some problems and want to roll back;
That is He said that he still wants to keep the contents of the dev-b branch unchanged; how to do this?

怪我咯怪我咯2767 days ago826

reply all(3)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-06-10 09:49:55

    git reset --hard HEAD~1  

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-06-10 09:49:55

    http://www.liaoxuefeng.com/wi...

    reply
    0
  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-06-10 09:49:55

    See if you have pushed it. If you have pushed it, use git revert. If it is only local, you can directly reset --hard the commit_id before merging

    reply
    0
  • Cancelreply