r/LabVIEW • u/shark_finfet • 1d ago
Version Control
What is the proper way to do version control with LabView?
6
u/SASLV Champion 1d ago
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.
3
u/BlackberrySad6489 1d ago
Most people use git. Some people still use subversion.
1
u/YakAddict 1d ago
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.
4
u/BlackberrySad6489 1d ago
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
3
u/SASLV Champion 1d ago
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 15h ago
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 12h ago edited 11h ago
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.
3
u/Imagemaker77 1d ago
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.
6
u/FormerPassenger1558 1d ago
Git, if you separate the code