LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Git for LabVIEW and TestStand

Hi wich is the best way to use Git as version control for projects that use TestSTand and LabVIEW extensions files. I was using TortoiseGit but doesn't handle very well non text files such as .vi .seq etc and when I merge files Git insert a line -> in .vi or .seq and corrupt the file.

I also try sourcetree but it's the same case.

 

Which tool do you recommend?

Ing. José Antonio Páez López
Functional Test Engineer & CLAD
0 Kudos
Message 1 of 7
(6,533 Views)

I'm not a Git expert, but i recommend the following two items.  Not sure if they've avoid the merge problem... just something I was told when getting ready to use LabVIEW with Git

 

1. Separate compiled code (Tools > Options > Environment > Separate compiled code from new files)

    a. https://zone.ni.com/reference/en-XX/help/371361R-01/lvhowto/separate_compiled_code/

2. Configure your Git repo (the one you intend to push to) "git config --local receive.denyCurrentBranch updateInstead"

     a. This is more for allowing pushes to a non-bare repository.

 

 

0 Kudos
Message 2 of 7
(6,501 Views)

You need to tell Git not to mess with those files by marking them as binary using the .gitattributes file. If it does not exist, create that file in the repository and add:

 

*.vi binary
*.vim binary
*.lvproj binary
*.lvclass binary
*.lvlps binary
*.aliases binary
*.lvlib binary
*.vit binary
*.ctl binary
*.ctt binary
*.xnode binary
*.xcontrol binary
*.rtm binary

*.seq binary

Certified LabVIEW Architect
0 Kudos
Message 3 of 7
(6,471 Views)

Like thols wrote, make sure Git is handling the LabVIEW files as binary files. For Merge and Diff you can configure Tortoise Git to use the LVCompare.exe and LVMerge.exe that comes with the LabView installation. All you have to do is add the tools to Tortoise Git like this:

 

Jens_S_0-1583228410099.png

Jens_S_1-1583228452962.png

 

There is also a ready to use .gitignore file here: https://github.com/github/gitignore/blob/master/LabVIEW.gitignore

 

With all this done, using Git is no problem at all.

 

 

0 Kudos
Message 4 of 7
(6,465 Views)

If you use Git, it doesn't really matter if you use TortoiseGit, SourceTree, GitKraken or the command line, or even TortoiseSVN.

 

These will all interface to Git, and the problems (and solutions) are the same for every tool: the files should not be merged.

Message 5 of 7
(6,462 Views)

I use SVN and Cloudforge for my private company and the one I am working for. Cloudforge is going. For the life of me I cannot get this going. Here is what I simply want to do. Create some test LabVIEW project locally, push it somewhere, then check it out. Feel like a real Dummy here. Been using SVN for years collaborating with others. Any help is appreciated

LeMur Technology Services, LLC
0 Kudos
Message 6 of 7
(6,130 Views)

@GleMunyan wrote:

I use SVN and Cloudforge for my private company and the one I am working for. Cloudforge is going. For the life of me I cannot get this going. Here is what I simply want to do. Create some test LabVIEW project locally, push it somewhere, then check it out. Feel like a real Dummy here. Been using SVN for years collaborating with others. Any help is appreciated


This is a new question and should be posted as one. Provide information on where you are stuck too. It should be pretty straightforward though. I suggest you install Sourcetree to start with, which will manage your repositories and make life easier.

Certified LabVIEW Architect
0 Kudos
Message 7 of 7
(6,102 Views)