Got a file that has two commits of interest, both on the Master
branch, both only modifying a single file foo
: a previous commit AA
, and the current version in HEAD
. I would like to merge the two versions of the file, keeping bits of both, into HEAD
on Master
.
I did the simplest thing that I thought would work:
git checkout -b merge-purgatory AA
git commit -m "pulled foo back from previous commit for merging into HEAD."
git checkout master
git merge merge-purgatory
Which simply overwrites the current HEAD
version of foo
with AA
version.
Tried the more verbose git checkout -m
as well, same result: a dumb overwrite.
How do I force git to treat the AA
version of foo
as a conflicting merge with the current HEAD
version?