I just tried to merging one of my branches, but unfortunately, there was a merge conflict because both my branch and the master added a file with the same name. Hence after sending the merge command I get:
...
Auto-merging Defines.php
CONFLICT (add/add): Merge conflict in Defines.php
Automatic merge failed; fix conflicts and then commit the result.
My problem is that git will alter the file to create a unified diff, rather than creating separate files to work from which I am used to with SVN. E.g. I would get three new versions of the file with the extensions .working
, .merge-right
and .merge-left
.
Question
Is it possible to configure Git to create multiple files instead of creating a unified diff, when it encounters a merge conflict? This way I can use a tool like meld to view a side-by-side diff. Alternatively, is it possible to manually do this with commands similar to git checkout --ours [filename]
and git checkout --theirs [filename]
but have it write to a new file rather then the original?