There are many links on the Internet to tell you how to configure git to use custom tools for VI. Many are wrong. Yesterday, I and another developer outside NI worked through the sequence and got it working repeatably on both of our machines. Here is the process.
Save both of the attached files someplace permanent on your hard drive that is outside of any particular git repo. We used
C:\Users\<<username>>\AppData\Local\Programs\GIT\bin
_LVCompareWrapper.sh_LVMergeWrapper.sh
Modify your global git config file. It is saved at
C:\Users\<<username>>\.gitconfig
You need to add the following lines:
[mergetool "sourcetree"]
cmd = 'C:/Users/smercer/AppData/Local/Programs/GIT/bin/_LVMergeWrapper.sh' \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"
trustExitCode = true
[difftool "sourcetree"]
cmd = 'C:/Users/smercer/AppData/Local/Programs/GIT/bin/_LVCompareWrapper.sh' \"$REMOTE\" \"$LOCAL\"
[merge]
tool = sourcetree
[diff]
tool = sourcetree
That's it. There are lots of ways to edit the .gitconfig from the command line or by using SourceTree's UI... if you know those ways, go ahead and use them.