TortoiseGit 内置的文件比对工具是 TortoiseMerge,用于文件比对和解决冲突合并,TortoiseGit 还支持外部的比对工具使用,比如 Beyond Compare 和 DiffMerge,配置很简单。
Beyond Compare:
- Diff Viewer:
C:\Program Files (x86)\Beyond Compare 3\BComp.exe %base %mine /title1=%bname /title2=%yname /leftreadonly
- Merge Tool:
C:\Program Files (x86)\Beyond Compare 3\BComp.exe” %mine %theirs %base %merged /title1=%yname /title2=%tname /title3=%bname /title4=%mname
DiffMerge:
- Diff Viewer:
C:\Program Files\SourceGear\Common\DiffMerge\sgdm.exe %base %mine
- Merge Tool:
C:\Program Files\SourceGear\Common\DiffMerge\sgdm.exe /merge /result=%merged %mine %base %theirs
示意图: