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
editor = code --wait
tool = sourcetree
tool = sourcetree
prompt = false
cmd = code --wait --diff $LOCAL $REMOTE
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.
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.
Still not working after complete reinstall of sourcetree. Followed these directions and even removed the app before starting over.
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
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
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:
I can't get it to launch via Sourcetree. I will pass it along to my macOS colleagues.
A vulnerability has been published today in regards to Sourcetree for Windows. The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events