5

I am using Msysgit with TortoiseGit to manage repositories containing different file types that need special diff and merge tools, including Matlab Simulink files.

I have configured these tools in TortoiseGit -> Settings -> External Programs -> Diff Viewer / Merge Tool. Principially, the configuration works.

Now I have encountered the problem, that TortoiseGit tries to merge my Simulink files automatically, using its own merge tool, which results in the error message:

"Merge conflict in filename.mdl. Automatic merge failed; fix conflicts and then commit the result."

Also, the file TortoiseGit tried to merge is corrupted afterwards. The file is highlighted with an exclamation mark and I can resolve the error with my configured merge tool via the TortoiseGit context menu.

I have worked around the automatic merging problem by specifying

*.mdl -merge

in my gitattributes file. Now TortoiseGit does no longer try to merge automatically, but I still have to invoke the merge tool via the context menu to fix the conflicts for each .mdl file.

Is there a way to force TortoiseGit to invoke the special .mdl-file merge tool as a replacement for its own automatic merge tool? The configuration must be on a per-filetype-basis.

Nzbuu
  • 5,241
  • 1
  • 29
  • 51
  • 2
    An automatically working solution for the terminal would also work when calling Git via TortoiseGit, I believe. But I could not figure out one for that case either. Eventually, I need to set up a solution that works with TortoiseGit, as I am not in a hacker/computer scientist environment here. The other users where hard to convince that a VCS is a good idea. Convincing them to use the terminal will be impossible. – user1211741 Feb 15 '12 at 16:23
  • i have felt your pain before. good luck! – Paul Nikonowicz Feb 15 '12 at 16:28

1 Answers1

1

Go to TortoiseGit settings -> Diff viewer -> Merge. There click on the Advanced button. Here you can configure different merge tools for specific file types.

MrTux
  • 32,350
  • 30
  • 109
  • 146