Rollback a Git merge

后端 未结 5 954
时光说笑
时光说笑 2020-12-04 05:02
develop branch
--> dashboard (working branch)

I use git merge --no-ff develop to merge any upstream changes into dashboard

5条回答
  •  不知归路
    2020-12-04 05:39

    git revert -m 1 88113a64a21bf8a51409ee2a1321442fd08db705
    

    But may have unexpected side-effects. See --mainline parent-number option in git-scm.com/docs/git-revert

    Perhaps a brute but effective way would be to check out the left parent of that commit, make a copy of all the files, checkout HEAD again, and replace all the contents with the old files. Then git will tell you what is being rolled back and you create your own revert commit :) !

提交回复
热议问题