1

I have two branches b1 and b2 like this:

MyRepo
|- .git
|---|- config
|- .gitattributes
|- D1
|---|- foo.xml

In git\config, I have this configuration:

[merge "MyMerger"]
    name = My merger
    driver = MyMerger.exe %B %A %O

MyMerger.exe exists in the Path environment variable

Then, in .gitattributes, I have this:

/D1/foo.xml merge=MyMerger

But when I try to merge B1 and B2 with changes in foo.xml in both branches, it fails:

Auto-merging D1/foo.xml
CONFLICT (content): Merge conflict in D1/foo.xml
Automatic merge failed; fix conflicts and then commit the result.

I also tried to move the .gitattributes in D1 using this configuration:

foo.xml merge=MyMerger

But it fails too.

What did I miss?

Thanks

2 Answers2

1

My initial config works fine as far as you don't have a BOM in your .gitattributes

0

I believe that you must have merge.tool and mergetool configurations to set a custom merge tool.

Check out this post that gives the exact git config commmands you need to run: Git on Windows: How do you set up a mergetool?

Community
  • 1
  • 1
mmitrik
  • 66
  • 3
  • Thanks for the reply So I now use this config: [merge] tool = MyMerger [mergetool "MyMerger"] cmd = "\"C:\\...\\MyMerger.exe\" \"$REMOTE\" \"$LOCAL\" \"$BASE\"" But it does not work better. Do I still miss anything? Thanks – Matthieu Mezil Jun 01 '15 at 22:42