The Absolute Easiest Way to Setup LVCompare and LVMerge

Setting LVCompare and LVMerge is as easy as copying a few lines of code and running them in Git Bash.

The Absolute Easiest Way to Setup LVCompare and LVMerge

Setting up LVCompare and LVMerge to work with Git can be complicated. The Git help tells you how to plug in an external diff toll, but it's somewhat cryptic. Even if you can decode it, unfortunately, LVCompare/LVMerge doesn't work out of the box. I had a solution that I called out in my Using Git Effectively class. However students were still having problems setting it up, so I decided to make it even easier. Then I thought, why only give this away to my students? Using LVCompare is such an important skill, that it should be available to all LabVIEW users.

The Solution

There are a variety of reasons why LVCompare doesn't work out of the box. The good news is that you don't have to understand any of that in order to make it work. All you literally have to do is copy the following couple of lines of code into Git Bash and run them.

cd && git clone https://gitlab.com/sas-blog/LVCompare-Merge-Setup.git && cd LVCompare-Merge-Setup && ./setupLVTools.sh

Git Bash automatically gets installed with Git For Windows and you can access it by right-clicking on the Desktop and selecting "Open Git Bash Here". So copy the code above, then right-click to open the Git Bash window. Copy, paste, then hit enter and you are done. Easy.

I've tested my solution, both from the Git Bash CLI and SourceTree. It should work with any of the various Git GUIs if you prefer a GUI Solution.

Security

The code snippet above will run a shell script on your machine. If you are worried about security, you can check out the script it runs by going to the repository here:

SAS-blog / LVCompare-Merge-Setup ยท GitLab
GitLab.com

You'll see it is pretty simple.

Digging Deeper

Check out our course if you want to learn more about how to use Git effectively. We've got many tips and tricks to make use Git a breeze.

Using Git Effectively - Syllabus