You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I'm using a Macbook Pro and have installed both Visual Studio Code (with command line) and Sourcetree. I used sourcetree to setup the external diff tool. And can confirm git is using it by going to a directory with changes and running "git difftool". This will launch vscode diff on the files in the directory. But whenever I right click a changed file in Sourcetree and select External Diff nothing happens. I verified there are no other git config files by using:
find /my/home/dir -n ".gitconfig"
Here is my .gitconfig
[code]
editor = code --wait
[merge]
tool = sourcetree
[diff]
tool = sourcetree
[difftool]
prompt = false
[difftool "sourcetree"]
cmd = code --wait --diff $LOCAL $REMOTE
path =
[mergetool "sourcetree"]
cmd = code --wait $MERGED
trustExitCode = true
Is there some step I'm missing or something I did incorrect?
I had better success. I have to set the command as follows:
/Applications/Visual\ Studio\ Code.app/Contents/MacOS/Electron
The args were as above and work. Note the \ slashes to escape the spaces... without these it fails silently.
Hi
I think its just a case of double dashes, --wait and --diff
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I noticed that after I had changed to the full name when updating the pasted config. I had -w and -d in the file itself but I do have --wait and --diff now. Still same result as -w and -d.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'll try completely removing sourcetree and reinstalling. I already did the same for visual studio code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Still not working after complete reinstall of sourcetree. Followed these directions and even removed the app before starting over.
https://confluence.atlassian.com/sourcetreekb/how-to-wipe-sourcetree-preferences-412484640.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No I don't think doing that to Sourcetree will change anything.
Playing around with it I followed the settings described here to get it working from the command line, then tried transposing them into the Sourcetree settings
https://stackoverflow.com/a/36644561/1297975
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What does your .gitconfig look like? I saw that article and don't see where mine is different.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah, sorry my mistake I overlooked the fact you are on macOS. I'm on Windows.
I will have to try and reproduce it on there. Sorry for any confusion.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I made a simple little script to log the call and its not even logging anything. Its as if sourcetree is not executing it at all.
/usr/local/bin$ cat code.sh
echo "Entered: " $@ >> /usr/local/bin/code.txt
/usr/local/bin/code "$@"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Sorry for the late reply, no I cannot get it to launch on macOS at the moment. The Sourcetree setup and the manual setup in my config look the same, but while I can launch vscode via:
git difftool
I can't get it to launch via Sourcetree. I will pass it along to my macOS colleagues.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So is there any update here or like an issue that we can track?
It's still not working with VS Code 1.28.2 and Sourcetree 3.0
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I had the same problem and I got it working by using the full path to the code executable, like this: /usr/local/bin/code
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.