Created
May 31, 2012 13:06
-
-
Save knzm/2843304 to your computer and use it in GitHub Desktop.
How to fix a merge commit when using git
This file contains hidden or 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
| # Before: | |
| # | |
| # * 06071d8 fix | |
| # | | |
| # * 75c9b25 merge | |
| # |\ | |
| # | * 34f1259 branch-B | |
| # | | | |
| # * | 5db192c branch-A | |
| # | | | |
| # | |
| # After: | |
| # | |
| # * 75f9219 merge | |
| # |\ | |
| # | * 34f1259 branch-B | |
| # | | | |
| # * | 5db192c branch-A | |
| # | | | |
| $ git reset --hard 5db192c | |
| $ git merge -X ours 34f1259 --no-commit | |
| $ git checkout 06071d8 . | |
| $ git commit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment