Integrate LVCompare into SourceTree Git

Updated Jan 14, 2026

Environment

Software

  • LabVIEW

You can integrate LVCompare, a LabVIEW comparison tool, into SourceTree Git to easily compare LabVIEW files during version control operations. This integration allows you to visually inspect differences between .vi files directly from SourceTree, improving workflow efficiency for LabVIEW developers.

Prerequisite Software

Before you begin, make sure you have the following installed:

  • LabVIEW (with LVCompare utility included)
  • SourceTree Git client
  • A GitHub account for repository hosting

 

  1. Create Your Own GitHub Account
    • If you don’t already have one, sign up for a GitHub account at https://github.com. This will allow you to host and manage your repositories.
  1. Create a Repository in GitHub
    • Create a new repository named LabVIEW Git Example.
    • Set the repository as Private for testing purposes.

    • Once created, copy the repository link for cloning later.

  1. Clone the Repository in SourceTree
    • Open SourceTree and go to Clone.
    • Paste the repository link you copied earlier.
    • Select the local directory where you want to clone the repository.
    • Click Clone.

  1. Verify the Cloned Folder. After cloning, you will see a folder created in the location you specified. The folder name will match your repository name (e.g., LabVIEW Git Example).

  1. Configure LVCompare in SourceTree
    • In SourceTree, go to Tools >> Options >> Diff.
    • Under External Diff/Merge, select Custom.
    • Set the External Diff Tool path to: C:\Program Files (x86)\National Instruments\Shared\LabVIEW Compare\LVCompare.exe
      • Note: This path applies if you are using LabVIEW 32-bit. If you are using LabVIEW 64-bit, ensure you set the correct path based on your installation directory.
    • Set the Arguments to: "$LOCAL" "$REMOTE"

 

  1. Create a LabVIEW Project
    • Inside the LabVIEW Git Example folder that has been clone, create a new folder for your LabVIEW project.
    • Create a simple LabVIEW VI (e.g., a While Loop with a Stop button).
    • Save the project.

 

  1. Stage and Push Files to GitHub
    • Open SourceTree and you will see unstaged files.
    • Click Stage All, then click Push.

    • Ensure the remote repository link is correct and click Push.

    • Verify that the project appears in your GitHub repository.

  1. Modify the LabVIEW Project
    • Open the LabVIEW Git Example folder on your local PC.
    • Modify the existing Main VI (e.g., add controls and indicators for a summation function).

    • Save the changes.
  1. Compare Changes Using LVCompare
    • Open SourceTree and you will see the modified file (e.g., LabVIEW Git Example/Main.vi) in unstaged files.
    • Right-click the file and select External Diff.

    • LVCompare will open, showing the previous version on the left and the modified version on the right.

    • Review the changes listed.
  1. Commit and Push Updated Files
    • If you are satisfied with the changes, close LVCompare.
    • Commit the changes and Push them to your GitHub repository.
    • Add a commit message (e.g., Add code) and click Push.

    • Verify that the repository is updated with your changes.