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

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

# What else to ignore?

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:


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.

  • \$\begingroup\$ I guess gerbers generated for a particular "version" of a PcbDoc is important to keep together under version control, good point. And I was unsure about the prjpcbstructure file however seemed logical to me, given it may include information about what external files/sources were used during that particular compilation of the project and may help diagnose missing files later \$\endgroup\$ – KyranF Mar 11 '15 at 15:48
  • \$\begingroup\$ When you send a board off for manufacture, it's a good idea to zip up the entire folder of the PCB project (minus the history and other files crap) and freeze it in the state at which it was sent off - I've done this a few times, and also forgot a few times, and wish I'd been more consistent. \$\endgroup\$ – KyranF Mar 11 '15 at 15:49
  • \$\begingroup\$ @KyranF - A lot of the altium files are ASCII, including the .PrjPcbStructure files. You can look in and see what they encode. \$\endgroup\$ – Connor Wolf Mar 12 '15 at 2:26
  • \$\begingroup\$ fair enough, i'll have a looksie! \$\endgroup\$ – KyranF Mar 12 '15 at 3:16
  • \$\begingroup\$ The .PrjPcb files are also ASCII, which is convenient if you've moved stuff around. You can manually edit the file contents. \$\endgroup\$ – Connor Wolf Mar 12 '15 at 3:36

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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.