Regarding howto/revert-a-faulty-merge.txt - another way to revert a merge

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I was looking for a way to revert a merge, and found the document at
howto/revert-a-faulty-merge.txt. It basically suggests that if you
reverted a merge and want to re-merge, you should first revert the
revert.

This is fine, but it means that you must remember to revert the revert
before the next merge, which may be hard to remember. I thought of
another solution: In the source branch, add a commit reverting all the
changes since the previous merge, then merge again from that brange to
the master branch, and then revert the revert. In a diagram:

----o---o---o---M---o---o------------W-------
       /       /                    /
------o---A---B---C-------!C!B!A---o----ABC--

(`!C!B!A` means a commit that reverts C, B and A, returning to `o`.
`ABC` means a commit that applies A, B and C, thus returning to the
tree after C.)

Now the W commit really reverts the M commit, and you can forget about it.

Would you be interested in a patch adding this to
howto/revert-a-faulty-merge.txt?

Thanks,
Noam




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux