How to minimize files in design review by file pattern or extension
  • 16 Sep 2022
  • Dark
    Light
  • PDF

How to minimize files in design review by file pattern or extension

  • Dark
    Light
  • PDF

Article Summary

Not every file you track changes in revision control is meaningful for review. ECAD tools often have large spaghetti project files that you definitely want to keep in revision control, but aren't easily readable or useful to review and clutter up the changed files.

Review file changes

If you want to add your files to repo AND want to see the diffs, use linguist-detectable in your .gitattributes file:

*.[pP][cC][bB][dD][oO][cC] diff=allspice linguist-detectable
*.[sS][cC][hH][dD][oO][cC] diff=allspice linguist-detectable

Hide file changes

If you want to track your files, but want to unclutter your repo and have the diffs automagically collapsed, use linguist-generated. If you're using Altium, the *.prjpcb file is a great candidate to fold up the text file changes.

Here is an example .gitattributes file:

*.[pP][rR][jJ][pP][cC][bB] binary linguist-generated
*.test linguist-generated

You can also add entire folders without having to specify individual filenames.

[Oo]utput [Ff]iles/** linguist-generated

As you can see here, the file is marked as "generated" and is folded so you don't have to read files you're not going to review.
image.png

If you would like to learn more about search syntax, enjoy this article.


Was this article helpful?