How do I resolve cherry-pick conflicts using their changes?
GitGit Problem Overview
My git cherry-pick FOO
produced a conflict.
I could go through the conflicting files and delete the lines between <<<<<<<
and =======
, and the conflict markers themselves, but I'm hoping there's an easier way.
I think the svn
equivalent was choosing theirs-conflict
to resolve.
How do I do this in git
?
I don't want git checkout --theirs <file>
as that seems to produce the same result as git checkout foo <file>
instead of just getting git diff FOO~..FOO <file>
applied.
Git Solutions
Solution 1 - Git
First you should undo your cherry-pick, try to run this
git cherry-pick --abort
Second, try to make cherry-pick, but in this time you get their changes not yours, so make this:
git cherry-pick --strategy=recursive -X theirs {Imported_Commit}