Tuesday 27 November 2018

Which files to version control for an Altium PCB project?


I'm trying to create the .gitignore file for an Altium project that is versioned with git and stored remotely on GitHub.


I don't want my teammates to continually struggle with having to update every single time I make a small change, like re-run design rule checks or re-compile the project. What are the minimum files I should I add to my version control system?



# Ignore the subdirectory where output job outputs are placed
GeneratedOutput

# Ignore autosave files (anything that begins with a tilde)
~*

# What else to ignore?

Answer



Here is the ignore list I use for managing Altium files in SVN. I'm sure they can be converted to a .gitignore format (if it's even needed) without too much trouble:


*/History/*

*.PrjPCBStructure
*.SchDocPreview
*.PcbDocPreview
*\__Previews
*\History
*.PrjPcbStructure
*~$*

Note that I disagree with @KyranF, you do not want to archive the prjpcbstructure files. They're entirely regenerated every time you compile the project, and there's not really anything in there anyways. They are functionally just build-artifacts, and those should not be committed.


Also, I've had my ass saved a few times by the History stuff, if a few hundred MB of local storage is a problem, you need 1. A bigger hard drive, and 2. To fix your priorities, if a few hundred MB is a serious consideration at all.



I also disagree strongly about committing gerbers. If you're trying to canonically link a actual PCB to a set of files, having the gerbers can be essential, particularly when things go wrong in the gerber export and/or processing stage. Admittedly, you shouldn't be comitting gerber files every day (you shouldn't be bothering to create them daily either), but you should ALWAYS commit (and ideally tag) each set of gerbers you release to manufacturing.




I think *~$* may be the temporary file indicator for SolidWorks, not Altium.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...