I'm using git to merge all the time. I'm getting annoyed with what comes next and I'd like to know if there's a better way for the work flow (a command I'm missing, another way to do it, whatever).
When I git merge towards my/branch
like git merge --no-ff --no-commit that/other-branch
, I usually resolve conflicts. Now that this is done, I inspect all the changes in case an auto-merge went wrong (hence the --no-commit if you wondered).
Last time, I discovered an auto-merge, that -you're gonna laugh- I'd rather have had as a conflict. Indeed, the auto-merge dropped something I would have liked it not to.
A quick parenthesis here: I'm not discussing whether git was right or wrong auto-merging how it did in regards to the most recent common base. I'm just telling, well: I'd rather have git replay the game for that single file amongst the others of that big merge and mark that as a conflict for me to edit manually.
So, the current setup is:
git merge --no-ff --no-commit
- Got conflict(s) to resolve, edited them, added them. Done. Let's move on.
- I inspect diffs (auto-merges included):
git diff HEAD
- I find file
foobar
that was auto-merged in a way that displeases me.
So what is command #5 that:
- Replay merge of single file
foobar
in the middle of the big merge of step #1 to force it to be marked as a conflict with a three-way diff friendly file i.e., with <<<<<<< ======= >>>>>>> instead of the result of the auto-merge.
Thanks.