Git Diff with Beyond Compare

前端 未结 17 2086
醉酒成梦
醉酒成梦 2020-11-30 16:39

I have succeeded in getting git to start Beyond Compare 3 as a diff tool however, when I do a diff, the file I am comparing against is not being loaded. Only the latest ver

17条回答
  •  借酒劲吻你
    2020-11-30 17:17

    The Beyond Compare support page is a bit brief.

    Check my diff.external answer for more (regarding the exact syntax)

    Extract:

    $ git config --global diff.external 
    

    at the command prompt, replacing with the path to "git-diff-wrapper.sh", so your ~/.gitconfig contains

    -->8-(snip)--
    [diff]
        external = 
    --8<-(snap)--
    

    Be sure to use the correct syntax to specify the paths to the wrapper script and diff tool, i.e. use forward slashed instead of backslashes. In my case, I have

    [diff]
        external = c:/Documents and Settings/sschuber/git-diff-wrapper.sh
    

    in .gitconfig and

    "d:/Program Files/Beyond Compare 3/BCompare.exe" "$2" "$5" | cat
    

    in the wrapper script.


    Note: you can also use git difftool.

提交回复
热议问题