TortoiseGit,基于每个文件配置自动合并工具
我使用 Msysgit 和 TortoiseGit 来管理包含需要特殊差异和合并工具的不同文件类型的存储库,包括 Matlab Simulink 文件。
我已经在 TortoiseGit 中配置了这些工具 ->设置->外部程序 ->差异查看器/合并工具。 原则上,配置有效。
现在我遇到了问题,TortoiseGit 尝试使用自己的合并工具自动合并我的 Simulink 文件,这会导致错误消息:
"Merge conflict in filename.mdl. Automatic merge failed; fix conflicts and then commit the result."
此外,TortoiseGit 尝试合并的文件随后已损坏。该文件用感叹号突出显示,我可以通过 TortoiseGit 上下文菜单使用配置的合并工具解决该错误。
指定来解决自动合并问题
*.mdl -merge
我已经通过在 gitattributes 文件中 。现在 TortoiseGit 不再尝试自动合并,但我仍然必须通过上下文菜单调用合并工具来修复每个 .mdl 文件的冲突。
有没有办法强制 TortoiseGit 调用特殊的 .mdl 文件合并工具来替代它自己的自动合并工具?配置必须基于每个文件类型。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
进入 TortoiseGit 设置 ->差异查看器 ->合并。单击“高级”按钮。在这里您可以为特定文件类型配置不同的合并工具。
Go to TortoiseGit settings -> Diff viewer -> Merge. There click on the Advanced button. Here you can configure different merge tools for specific file types.