Using LabVIEW's diff tool with SourceTree

Our team is using BitBucket for source code control and the SourceTree app for Windows to interface with our repositories. We've had a couple of small hurdles getting SourceTree to integrate with the LabVIEW diff tool, but here's a solution that's worked for us. (Credit to Paul Lotz on Atlassian's forum,

First, download these scripts and place them in a local folder:

Diff and Merge Scripts

For this example, I'm assuming you'll put them in the folder:

C:\Users\User Name\AppData\Local\Programs\GIT\bin\

Next, open the options for SourceTree, and go to Tools > Options:

Bitbucket source configuration.

For the diff command, change from "System Default" to custom and enter:

C:/Users/User Name/AppData/Local/Programs/GIT/bin/

And for arguments:

\"$REMOTE\" \"$LOCAL\"

For the merge command, use:

C:/Users/User Name/AppData/Local/Programs/GIT/bin/

And for arguments:

\"$REMOTE\" \"$LOCAL\"

If you'd like for us to help get your LabVIEW team set up with SourceTree, please let us know by contacting us.

Marty Vowles

Vice President of Engineering, Senior Systems Engineer

Marty graduated from the University of Utah with a BS and MS in Mechanical Engineering with emphasis in mechatronics and robotics. He began his career at OrbitalATK as a process engineer. In his five years in that role he developed systems for electronic test of ordnance, large motor weighing, automated pressure tests, and statistical process control.

Marty then spent five years on the software engineering team where he became the team lead and Certified LabVIEW Architect There he worked on avionics test sytems and control software for a carbon fiber weaving machine among other projects.

Marty enjoys his wife and four children, farming, and repairing old cars.


Boyd Crow

November 1st, 2019 at 5:13 pm

I do not understand the backslashes in the path definitions of the .sh file. They seem arbitrary and don't seem to involve "escaping" spaces. I cannot get SourceTree for Windows to diff two VI versions. If I just select the two versions, then click the VI filename to diff, I get "No changes in the file, or it is a binary file." If I click on the Gear icon drop down and select external diff, nothing happens. Open "Before" and Open "After" do operate as expected, showing the two different versions of the VI.

I did enable UAC, enable Developer Mode, enable Windows Subsystem for Linux, and install Ubuntu from the Windows Store with suitable reboots before I attempted the changes recommended in this article. Any clues where I can look for log entries, run command manually or otherwise diagnose this problem?


June 17th, 2020 at 4:31 am

Hi Marty,

This looks promising, and I would like to set it up! However, your wrappers are in your google drive trash. Is there an updated version of this?

Tanner Ellsworth

June 30th, 2020 at 5:57 pm

I zipped the compare and merge scripts that I am currently using, uploaded them and updated the link, so you should be able to download them now.

Add new comment