Rollback a Git merge

后端 未结 5 953
时光说笑
时光说笑 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:31

    From here:

    http://www.christianengvall.se/undo-pushed-merge-git/

    git revert -m 1 
    

    Git revert adds a new commit that rolls back the specified commit.

    Using -m 1 tells it that this is a merge and we want to roll back to the parent commit on the master branch. You would use -m 2 to specify the develop branch.

提交回复
热议问题