When merging topic branch \"B\" into \"A\" using git merge
, I get some conflicts. I know all the conflicts can be solved using the version in \"B\".
I a
The equivalent(which keep parent order) to 'git merge -s theirs branchB'
Before merge:
!!! Make sure you are in clean state !!!
Do the merge:
git commit-tree -m "take theirs" -p HEAD -p branchB 'branchB^{tree}'
git reset --hard 36daf519952 # is the output of the prev command
What we did ? We created a new commit which two parents ours and theirs and the contnet of the commit is branchB - theirs
After merge:
More precisely:
git commit-tree -m "take theirs" -p HEAD -p 'SOURCE^{commit}' 'SOURCE^{tree}'