Yes, but it will mostly be by manually making that happen. You'll tell Git you're merging the two relevant branches, but that it shouldn't try to commit the result on its own, (edited to add: nor fast-forward if it thinks the merge is trivial):
git merge --no-commit --no-ff branch-to-merge
Then you'll ask git for the file as it appeared in the two branches:
git show HEAD:filename >filename.HEAD
git show branch-to-merge:filename >filename.branch
and their merge base,
git show `git merge-base HEAD branch-to-merge`:filename >filename.base
You'll merge them using whatever tool you want (e.g.)
meld filename.{HEAD,branch,base}
you'll stage that (git add filename
), and then commit the merge (git commit
).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…