- Having a huge number of conflicts, and/or...
- Backing out changes in the target branch that should remain.
A simple solution is to have git think the merge has happened, but not actually merge the files. This is actually very simple:
First, merge without auto-committing or fast-forwarding:
$ git merge hotfix/1.2.3 --no-commit --no-ff
This will do all the merging, but it will not create the merge commit. You can then discard all the changes, or only some of them, and commit:
$ git commit
Subsequent merges to the target branch will not try to re-apply any of the changes, as it thinks everything has been merged.
No comments:
Post a Comment