Undoing Merges
Good article about undoing merges:
http://git-scm.com/2010/03/02/undoing-merges.html
Summary
-
Undoing a merge without losing history
$ git revert -m 1 [sha_of_merge_commit] Finished one revert. [master 88edd6d] Revert "Merge branch 'myBranch'"
-
To re-merge that branch again we need to revert the revert of the merge
$ git revert 88edd6d [master 268e243] Revert "Revert "Merge branch 'myBranch'""
And optionally re-merge that branch again if it has new commits
$ git merge myBranch
Written by Yan
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Merge
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#