This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Git - Revert a Merge | |
#iOSBySheldon | |
Reverting a commit is usually not hard, specially with the help of Source Tree, if, you are reverting a simple commit on a branch. What you need to do is just to right click the commit you want to revert and then choose "Reverse Commit". | |
However, if the commit you want to revert is a "Merge", it will be a little bit harder. If you do the same thing in Source Tree, right click - "Reverse Commit", it will give you an error that Source Tree cannot revert it because there are two branches involved. | |
Let's name the merge-from branch as "F" and "merge-to" branch as "T". | |
Here is the solution for it (only can be done in Terminal, at least today): |