How do I use Meld as a merge tool with Sourcetree on Windows?

后端 未结 5 2015
暗喜
暗喜 2021-01-31 09:04

I have the following in my .gitconfig file:

[user]
    name = myname
    email = myname@gmail.com
[core]
    autocrlf = true
    excludesfile = C:\\         


        
5条回答
  •  Happy的楠姐
    2021-01-31 09:39

    If you don't want to modify the PATH environment variable, you can use the DOS-compatible short names:

    C:\Progra~1 = C:\Program Files
    C:\Progra~2 = C:\Program Files (x86)
    

    That avoids the trouble-causing spaces in the path and plays nice with Sourcetree. It's hackish, but it works. You can then use something like this as the path to Meld:

    C:\Progra~1\Meld\meld.exe
    

    It may not be guaranteed that Progra~1 maps to the 64-bit directory, so you might need to experiment with which one maps to which.

提交回复
热议问题