Which files to version control for an Altium PCB project?

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.


As an addition to the other answers:

  • Do not version

    • Obvious files: Potentially all generated output, like BOM, report files and so on.
    • .Dat - Is (re-)generated as part of BOM generation. Does only seem to contain redundant information.
    • .TLT - GUI layout information.
    • .REP - Teardrop Report file.
  • Do version / consider versioning

    • Obvious files: .PcbDoc, .PrjPcb, .SchDoc, .OutJob, .PrjPcbVariants
    • .DsnWrk - I often find, that I open several unrelated PCB projects while working through the day, which results in changes to the workspace file. Since that is not relevant for version control, I tend to leave it out.
    • PcbLib, .SchLib, .PvLib - A project may contain some project specific libraries.
    • .PrjPcbStructure - Contains information about the hierarchical structure. It gets (re-)generated on compilation. Can be versioned, since when the structure changes, a commit is pending anyway.
    • .Annotation - Contains Board level component annotation information.
    • .Harness - Those files contain Harness definition and can potentially contain arbitrary definitions that can't be generated.

You want to version control the .prjpcb (assuming you have a PCB project!) , .prjpcbstructure, .pcbdoc, and .schdoc files.

The rest, such as the history, previews, gerber outputs etc are sort of transient files, not important to the project.

edit: also be aware of the huge size of "history" files, they can become many hundreds of megabytes, so you should adjust the history size in the project/Altium preferences to keep it under control, even if that whole folder is being ignored by sub-version file control, it will still eat up HDD space on your PC.

Tags:

Altium