The diff tool in Visual Studio when using the Git Plugin

前端 未结 2 1465
南旧
南旧 2021-02-01 19:00

Microsoft has released a Git plugin for Visual Studio 2012. I have found it to be excellent, but there doesn\'t seem to be any option to change the default Diff tool. Worse, I

2条回答
  •  闹比i
    闹比i (楼主)
    2021-02-01 19:40

    You have to change your local .gitconfig, rather than make the change through Visual Studio as you would with TFS

    https://gist.github.com/mkchandler/2377564

    Add the following to your global .gitconfig file:
    
    [diff]
        tool = diffmerge
    [difftool "diffmerge"]
        cmd = \"C:\\Program Files\\SourceGear\\Common\\DiffMerge\\sgdm.exe\" \"$LOCAL\" \"$REMOTE\"
    [merge]
        tool = diffmerge
    [mergetool "diffmerge"]
        cmd = \"C:\\Program Files\\SourceGear\\Common\\DiffMerge\\sgdm.exe\" -merge -result=\"$PWD/$MERGED\" \"$PWD/$LOCAL\" \"$PWD/$BASE\" \"$PWD/$REMOTE\"
        trustExitCode = true
    [mergetool]
        keepBackup = false
    

提交回复
热议问题