03-02-2020 03:48 PM
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?
03-02-2020 05:01 PM
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.
03-03-2020 03:16 AM
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
03-03-2020 03:46 AM - edited 03-03-2020 03:47 AM
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:
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.
03-03-2020 04:08 AM
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.
08-12-2020 08:01 AM
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
08-13-2020 02:58 AM
@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.