Yes, but basically it will be done manually. You will tell Git that you are merging the two corresponding branches, but should not try to fix the result yourself (edited to add: or fast forward if it considers the merge to be trivial):
git merge --no-commit --no-ff branch-to-merge
Then you ask Git for the file how it appeared in two branches:
git show HEAD:filename >filename.HEAD git show branch-to-merge:filename >filename.branch
and their merger base,
git show `git merge-base HEAD branch-to-merge`:filename >filename.base
You combine them using any tool you want (for example)
meld filename.{HEAD,branch,base}
you do this ( git add filename ) and then copy the merge ( git commit ).
Phil Miller Jun 07 2018-12-12T00: 00Z
source share