Revert a merge after being pushed

前端 未结 4 1646
灰色年华
灰色年华 2021-01-30 05:19

Steps i performed:

I have two branches branch1 and branch2,

$git branch --Initial state
$branch1

$git checkout branch2
$git pull origin branch1 --Step1
         


        
4条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-30 05:46

    You can revert the merge following the official guide, however this leaves Git with the erroneous belief that the merged commits are still on the target branch.

    Basically you have to :

    git revert -m 1 (Commit id of the merge commit)
    

提交回复
热议问题