Improving LabVIEW Language Recognition on GitHub

Updated Oct 15, 2020



  • LabVIEW


  • Git
  • GitHub

Github has become a popular location to host and share LabVIEW projects and code.  For each repository on GitHub, GitHub employs a library called Linguist which recognizes languages in a git repository.  Because many LabVIEW files are saved in a binary form, Linguist is unable to natively analyze these files and this results in many cases where LabVIEW projects are not recognized correctly or many of the files are not recognized as LabVIEW related.

This tutorial is useful for overriding the standard analysis done by Linguist and providing more information so that it can correctly characterize LabVIEW code in the repository.
This tutorial assumes you have already successfully imported code to GitHub.

  1. Download the .gitattributes file attached to this article.
  2. Navigate to the root directory of the local git repository you would like to add the additional language support for.
  3. Copy the file to the root directory next to the .git folder.
  4. Add the file to the repository with git.
  5. Commit the changes to the repository with git
  6. Push the changes to GitHub
    • Note: It may take a a few minutes for the changes to take effect on the GitHub.

After the change takes effect on GitHub, you should now see the Languages section appropriately reflect the percentage of LabVIEW code included in your repository.


Next Steps

If your project contains non-standard LabVIEW files you would like to show up on the language analysis, you can edit the .gitattributes file to include other file extensions.