In a 'git merge ' I would like any difference, even if not normally a merge conflict, to be considered a merge conflict. Then, with 'git mergetool' I can see and resolve each and every difference. I tried specifying '* -merge' in .gitattributes but that doesn't seem to have worked:
$ git checkout master Switched to branch 'master' $ ls foo.c $ git merge add-on Updating a628824..2219552 Fast-forward 0 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 bar.c $ cat .gitattributes * -merge $ ls bar.c foo.c For the above 'git merge add-on' I expected a merge conflict for 'bar.c' with no base version, no local version and a remote version. [edit] As suggested in one answer, a merge didn't occur above. Here is a case where I forced a merge, still no desired merge conflict:
$ git merge --no-ff add-on Merge made by the 'recursive' strategy. 0 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 bing.c Note that in above 'bing.c' is actually empty; but, that isn't the problem because providing a non-empty file still gets merged. [edit 2] I tried --no-commit with this result:
$ git merge --no-ff --no-commit add-on Automatic merge went well; stopped before committing as requested $ git status # On branch master # Changes to be committed: # # new file: boom.c # $ git mergetool No files need merging $ cat .gitattributes * -merge What am I missing? Is there a way to confirm that '.gitattributes' is getting used/read?