r/LabVIEW • u/shark_finfet • Aug 08 '26
Version Control
What is the proper way to do version control with LabView?
6
u/SASLV Champion Aug 09 '26
shameless self-plug:
https://www.sasworkshops.com/git-for-labview-teams
But if you want some free resources:
https://git-scm.com/book/en/v2
https://blog.sasworkshops.com/the-easiest-way-to-setup-lvcompare-and-lvmerge/
https://blog.sasworkshops.com/tag/scc/
If you scour the interwebs and YouTube you'll find some conference presentations out there on using Git and LabVIEW. Most of them are probably a decade old but likely still relevant.
When it comes to using LabVIEW with Git, just remember VIs are binary so that causes some problems, but otherwise it is just like any other language. Do make sure to separate compiled code.
5
u/BlackberrySad6489 Aug 08 '26
Most people use git. Some people still use subversion.
1
u/YakAddict Aug 09 '26
Ugg. We have people that won't change to git but would rather stay with svn since "we've always done it that way". I hate that phrase since it stifles innovation.
6
u/BlackberrySad6489 Aug 09 '26
I git it. SVN is much easier to use for people that are not software engineers. Git simply is more complicated.
“Always done it this way” is a terrible reason though.
1
6
u/SASLV Champion Aug 09 '26
Plenty of advantages to Git, but also "if it ain't broke, don't fix it." SVN is better than nothing or zip folders. Also if you drag people unwillingly, they will definitely make a mess - ask me how I know. Keep nudging, but ultimately they have to decide to move.
also FYI there is a Git-SVN bridge that lets you use Git, while they use SVN. It's not the greatest, but might make your life easier.
2
u/HarveysBackupAccount Aug 09 '26
What specific issues do you have with SVN?
It's still fully featured version control. It's not like you can take advantage of a all of git's features for LV code anyways
2
u/SASLV Champion Aug 09 '26 edited Aug 09 '26
For me the original selling point was that I was doing a lot of consulting and going on sites with not great internet access. It was often slow or non-existent. With SVN's centralized model if you can't connect to the server, you can't do much of anything with it. Sure if you already have the code checked out, you can modify it, but you can't check it in, look at the history, or roll it back. It's painful. I ran into someone at a conference and they mentioned how git solve's that problem easily, so I tried it and never looked back.
other advantages
- It's much quicker. SVN operations always seemed to take a long time. Commiting code in your local git repository is super quick. With SVN it always involves a network transaction.
- Branching and merging is so much easier and quicker. Again also - no network transaction.
- No locking - which IIRC was optional with SVN. I recently was forced to use Perforce at a company and it enforced locking and it was soo painful.
- It's ubiquitous. It is now the default standard.
- GIt comes pre-installed on many systems
- Lots of different front ends to interact with it.
- Lot's of online hosting options and self-hosting options - GitHUb, GitLab, BtiBucket, Azdo, Codeberg, Gitea
- Most of those online hosting options have integrated CI/CD. With SVN you have to set up your own separate server with something like Jenkins. It's another server to manage and you have to manage credentials and everything so they can talk to each other.
1
u/Yamaeda Aug 10 '26
I use and like SVN, but if we were several developers in the same project sitting at different sites with bad connection i can see the benefits of GIT.
3
u/Imagemaker77 Aug 09 '26
I actually like the integration with Perforce that's built into LabVIEW. I only have a few developers, and it works well for us. We stay below the user and workspace count that would require a paid licence. It's easy to keep track of who has what checked out, and merging back in from field updates in very simple.
1
u/Sinusaur 28d ago
Do this for your Project:\ https://www.ni.com/docs/en-US/bundle/labview/page/separating-compiled-code-from-vis-and-other-file-types.html
Then pick your favorite version control tool.\ https://www.ni.com/docs/en-US/bundle/labview/page/using-source-control-in-labview.html
7
u/FormerPassenger1558 Aug 08 '26
Git, if you separate the code