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.
Go to TortoiseGit settings -> Diff viewer -> Merge. There click on the Advanced button. Here you can configure different merge tools for specific file types.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With