Gerber files should not be part of a KiCad project’s daily Git commits. They are generated outputs, and keeping them beside changing source files creates the risk of sending stale manufacturing files to a fabricator. The sound default is to commit source, generate outputs automatically for validation, and preserve the exact fabrication package as a release artifact tied to its source commit.
Why Gerber files are not source files, and why the distinction matters for Git
The design from which an output is generated is the source of truth. KiCad project files, schematics, board layouts, libraries, and design rules define that design. Gerbers are derived from it. KiCad or a build script can regenerate them from the source, so treating them as continuously maintained source introduces a second representation that must remain synchronized.
KiCad 6+ stores schematics and board files as plain-text S-expressions, which makes Git a good fit for tracking their history. Git can track changes to those files without a fresh manufacturing package in every commit. The governing rule is therefore to commit the source of truth and ignore what KiCad or a build step can regenerate. A fabrication record has a different job from development history and belongs at the point chosen for a release.
The drift failure mode: how stale Gerbers cause a bad board to get fabricated
Drift happens when committed Gerbers no longer match the committed board. A designer exports Gerbers and commits them with the source, so the files initially agree. Days or weeks later, the schematic or layout changes in a separate commit. That is a normal step in development, but the manufacturing files exported earlier now describe an older design.
At order time, the gerbers/ folder is still present. The folder may not match the current board file, but the designer can reasonably think a saved manufacturing package is up to date. The designer zips that folder and sends it to the fabricator without realizing that the source changed after the export. The fabricator builds from the supplied files, and the error surfaces when the hardware arrives.
Git has kept both sets of files, but that does not show that they describe the same revision. The dangerous step is the unexamined assumption that files found together were generated together.
Large, binary-like ZIP files accumulate across revisions, making clones slower and history noisier. That additional history does not ensure that the archive matches the current board file, because an archive’s existence says nothing about whether it is the appropriate archive to send. The repository grows while the fabrication decision remains vulnerable.
What the .gitignore should cover and why each exclusion exists
To establish the source/output boundary in practice, the repository should use a .gitignore that excludes generated files by default. This makes the normal workflow less dependent on remembering which files to omit from each commit. The tracked design should include *.kicad_pro, *.kicad_sch, and *.kicad_pcb, covering the project, schematics, and board layout. Libraries kept in the project belong there too, including *.kicad_sym and *.kicad_mod.
The supporting files are part of the source record. These include sym-lib-table, fp-lib-table, and *.kicad_dru, together with the README, hand-maintained documentation, and netlists. Library tables should use ${KIPRJMOD}-based paths so that they work on other machines. KiCad substitutes the current project directory at runtime, avoiding dependence on one designer’s project location.
The ignore rules should cover fp-info-cache and ~*.lck. The former is a footprint index that KiCad rebuilds locally, while the latter covers autosave lock files. Committing the index causes conflicts over unintended edits, drawing attention away from changes to the design, often when every file in the project directory is treated as source.
Generated manufacturing directories should also be excluded, including gerbers/, output/, fabrication/, and jlcpcb/, together with *.zip. Generated 3D render PNGs and exported PDFs should stay out of daily commits too, while assets made by hand that cannot be built from source belong in version control. Saving Gerbers as release attachments preserves them without leaving a seemingly current fabrication folder beside an evolving board.
Why S-expression diffs are hard to read, and what that means for review
Plain text does not make a layout visually intuitive. This is a real limitation of source-only review through raw text. It calls for a visual interpretation of the source, rather than another committed representation that can drift away from it.
dreiecKi produces a self-contained, interactive HTML file showing a visual diff of KiCad schematics between two Git revisions. KiDiff makes a PDF that shows what was added in green and what was removed in red within each layer. Both operate on source files stored in Git history. Neither requires committed Gerbers to make the design changes visible.
These tools separate storage from presentation without changing which files are authoritative. Git retains the source revisions, and the review tool renders the differences in a form suited to hardware review. That separation also keeps the review anchored to the files under development. Difficulty reading an S-expression diff is therefore a reason to improve the review interface.
Generating Gerbers automatically on push with KiBot or kicad-cli
Excluding Gerbers from commits need not delay export checks until fabrication time. A GitHub Actions or GitLab CI job can run KiBot or kicad-cli on every push, generating outputs from the source commit under validation. The outputs become downloadable artifacts kept outside the main commit history. This flags errors early without making designers keep exported files up to date by hand.
KiBot controls KiCad from command-line scripts and can export Gerbers, drill files, BOMs, and pick-and-place files. It can also run ERC and DRC without opening the GUI. In a typical pipeline, ERC checks the schematic for unconnected pins, missing power flags, and duplicate designators, and the pipeline stops if ERC fails. DRC checks the board against clearance, trace width, and hole-size rules.
After validation, the pipeline generates fresh Gerbers and drill files from the source commit, then produces the BOM and pick-and-place file. It packages those outputs as downloadable artifacts. Manual zipping and emailed attachments are no longer the means of assembling that package.
The usual pattern does not commit those artifacts back. KDT_Hierarchical_KiBot represents a variant in which CI commits outputs, offering a middle ground between manual export maintenance and artifact-only generation.
For fabrication, a scripted, repeatable export removes the stale-folder failure mode when the package sent to the fabricator is generated fresh from the selected commit. Generating an artifact on each push checks the source, but the manufacturing package still needs to be tied to a chosen release. That is the role of the tag.
Attaching Gerbers to a tagged release as the permanent fabrication record
A fabrication milestone is the right point to preserve manufacturing outputs permanently. Once the source is known to be good and ERC and DRC pass, a release tag marks the exact commit to build. An annotated tag can record that milestone with git tag -a rev-b -m "Rev B — sent to fab 2026-07-10". CI or a local script then invokes kicad-cli or KiBot against that tagged commit and attaches the fresh package to the release.
The tag supplies the source identity. The release attachment supplies the exact output retained for fabrication, rather than requiring a later export to stand in for the files actually sent. One identifies the design revision, while the other preserves the manufacturing package associated with it.
The kicad-release-automation-module, documented in June 2026, uses a tag-triggered GitHub Action to invoke kicad-cli and place fresh Gerbers in a ZIP under Releases, with the atmega1608_dev ATmega1608 breakout board repository demonstrating automatically versioned assets corresponding to exact, reproducible snapshots. Brainbow uses a different pattern, generating Gerbers in the Fabrication folder, committing and tagging them, then removing the Gerbers and committing the deletion. Development then goes back to source-only files, while the tag keeps the fabrication package. The retained files can help trace manufacturing errors weeks later.
Release attachments also serve open-source hardware users who lack a KiCad environment. Contributors can work from the source repository, while fabricators can obtain ready-to-use Gerbers from the release.
The case for committing Gerbers anyway, and when it is actually reasonable
The strongest argument for committing Gerbers is exact preservation. A team may need the precise bytes sent to the fabricator, independent of whether a future toolchain can reproduce them. Brainbow’s tagged commit-and-delete pattern addresses that requirement directly. It keeps the outputs as a manufacturing record at a milestone, so they do not have to go with every design edit.
Regeneration and preservation are not the same guarantee. Scripted exports from a pinned KiCad version inside a reproducible container make regeneration reliable enough for most teams, but preserving the original package answers a different need. A release attachment can meet that need without inserting outputs into ordinary development history. Committing the package at a tag is also defensible when that is the chosen recordkeeping method.
The objection does not justify continuous Gerber commits. The publisher’s internal data shows that teams tracking Gerbers in ordinary commits, rather than attaching them to releases, are the ones most likely to send stale fabrication files. Drift can happen at any point in development when the source changes without a matching export. Preserving one deliberate fabrication snapshot does not require accepting that ongoing synchronization burden.
The decision is about when to retain outputs. At a fabrication tag, committing Gerbers is reasonable. For day-to-day development, CI-generated artifacts and release attachments are the better default because they give teams fresh exports and keep a manufacturing record.
Where purpose-built hardware storage fits alongside a Git workflow
Git handles source history and release tagging well, but it does not itself provide a rendered schematic, a 3D view, or a browsable BOM in the browser. Those are the views a hardware reviewer needs to sign off on a design. A Gerber ZIP attached to a release preserves files without making the layout changes inspectable. Storage and review remain separate functions.
Purpose-built hardware storage helps with that review while leaving source history in place. Visual tooling such as KiRI, dreiecKi, and KiDiff makes KiCad source changes readable, while browser-based design views support inspection beyond a raw file diff. Rendering still has limits. Uploads do not always render fully, so the presence of an uploaded design should not be mistaken for a complete reviewable view.
Claude, ChatGPT, and Cursor can read schematics, nets, BOMs, and files through an MCP server, with local servers available for Claude and Cursor and remote HTTPS required for ChatGPT. Saving new versions requires explicit permission. Reading a board never implies permission to change it, just as viewing a fabrication package does not establish that it represents the current source.
The complete workflow assigns each record a clear role. Source files belong in Git, Gerbers belong with the fabrication release, and review infrastructure makes the design readable enough to approve. This links the design that was reviewed to the package used for manufacturing, without depending on folder names or emailed ZIPs to show which version is correct.