external diff how to configure

Ni Xin January 4, 2015

Hi,

I'm going to use my own customized diff tool.

I have already integrated my customized diff tool with Git bash. In my .gitconfig file, I have:

[diff]   external = <my diff>

And my customized diff tool can be used as normal git command from git bash:

git diff --cached $FILENAME

It works fine.

So with SourceTree, I go to Tools -> Options -> Diff, and in the External Diff section, I select "Custom" as External Diff Tool, and Diff Command as: git diff --cached, Arguments as: $LOCAL


But this doesn't work with the external diff button.

I can still call the cmd from Terminal and it works fine, but it won't work with the external diff button.

Can anyone help me on this?

Many thanks

1 answer

1 accepted

1 vote
Answer accepted
Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 4, 2015

You need to configure <my diff> as the external diff tool, not git diff --cached.

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events