To download NI software, including the products shown below, visit ni.com/downloads.
Overview
Given a directory, this VI generates a .gitignore file for all the existing files of that directory.
Description
Creating a .gitignore file allows you to then overlay a git repository over that directory ignoring all the files that were there already.
If you get an error running this VI that says you do not have permission to create the file, you will either need to run LabVIEW as an administrator so it has privileges or else create a new text file named “C:\Program Files (x86)\National Instruments\LabVIEW <version>\.gitignore”, and then copy the contents of "file contents" into it.
Requirements
Steps to Implement or Execute Code
Additional Information or References
VI Snippet of Block Diagram
**This document has been updated to meet the current required format for the NI Code Exchange. **
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Why would someone want to generate such a giant gitignore? You can use wildcards to ignore entire directories
Because you have a system under which the files managed by git are going to be scattered throughout an existing files structure, where the sync is going to pull down into a non-empty directory. Why would you do this? Because you're trying to port a system developed for Perforce or other SCC systems that allow (and to some degree encourage) such overlaying into git. Not at all the recommended way of working with git. The VI was needed and this was the best place I could put it to make it available to everyone who needed it.