Skip to the content
2 layers23 × 11.8 mmKiCad git tests, the printed circuit board in 3D

A scratch project for learning how to use git with KiCad. The board itself is throwaway; the point is the workflow around it.

Size
23 × 11.8 mm
Copper layers
2
Thickness
1.6 mm
Parts
2
Nets
3
Pads
4
Tracks, vias
2, 0
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
12 Sep 2026
Updated
16 Sep 2026

Overview

KiCad git tests is an open-source printed circuit board by Alex-Hermeling, from the Alex-Hermeling/KiCad-git-tests repository on GitHub. It is a 2-layer board of 23 × 11.8 mm with 2 parts on 3 nets, routed with 2 tracks and 0 vias.

Its parts include 1 resistor and 1 diode.

README

README.md

KiCad-git-tests

A scratch project for learning how to use git with KiCad. The board itself is throwaway; the point is the workflow around it.

Everything below was worked out while setting this repo up, including the mistakes — those are recorded at the bottom so they don't get repeated.


1. What belongs in git, and what doesn't

KiCad's real design files are text s-expressions, which git handles well. KiCad also scatters caches, locks and binary backups through the project directory, which git handles badly. The whole discipline is keeping the second group out.

Tracked

FileWhat it is
*.kicad_proProject settings, design rules, net classes
*.kicad_schSchematic — text, diffable
*.kicad_pcbBoard layout — text, diffable
*.kicad_druCustom design rules, if present
Custom *.kicad_sym / *.kicad_modProject-specific symbols and footprints

Ignored (see .gitignore)

PatternWhy
*.lck, ~*.lckLock file written while the project is open. Contains your hostname and username. Collaborators would fight over it.
*.kicad_prlLocal settings — window layout, visible layers, last zoom. Per-user, not per-project. Churns on every open and close.
*-backups/KiCad's automatic backup zips. Binary, rewritten on every save, undiffable. The single biggest cause of a bloated KiCad repo.
_autosave-*, *.bak, *-bakCrash-recovery leftovers
fp-info-cacheGenerated footprint cache
*.netNetlists — regenerated from the schematic on demand
gerbers/, *.gbr, *.drl, *.pos, …Fabrication output. Derived artifacts; regenerate them from a tagged commit instead.

The rule of thumb: if KiCad can regenerate it, don't commit it. The exception worth considering is fabrication output for a revision you actually ordered — some people commit those deliberately, tagged, as a record of what was built.

.gitattributes marks the KiCad formats as text with LF endings so git never misdetects one as binary and refuses to diff it, and marks zips and STEP files as genuinely binary.

Enforced, not just ignored

.gitignore only stops an accidental git add .. A git add -f or a Git GUI can still commit these files, so there are two checks on top of it. Both use the same rules, in .github/scripts/check-repo-files.sh:

ResultFiles
❌ Blocked*.lck, *.kicad_prl, *-backups/, _autosave-*, *.bak / *-bak, fp-info-cache, .DS_Store / Thumbs.db
⚠️ Warning onlyGerbers (*.gbr, *.gtl, …), drill files, *.pos / *-pos.csv, *-bom.csv, *.zip, *.net, anything in gerbers/, production/, fab/, kibot-output/
  • On pull requests into main, .github/workflows/repo-hygiene.yml runs the Repo file check. It fails if the PR adds a blocked file. For fabrication output it passes, but posts a PR comment asking the reviewer to confirm the files were committed on purpose. Deleting a bad file never trips the check.

  • Locally, .githooks/pre-commit refuses the commit for blocked files and prints a warning for fab output. Turn it on once per clone:

    bash
    git config core.hooksPath .githooks

    To skip it once, on purpose: git commit --no-verify.

If a blocked file does get in, remove it from git and keep your local copy with git rm --cached -- <file>, then commit.

One-time GitHub setup: in Settings → Rules → Rulesets (or Settings → Branches), require pull requests for main and add Repo file check as a required status check. Without that, a PR with a failing check can still be merged, and direct pushes to main skip the check entirely.


2. Three habits specific to KiCad

Close KiCad — or at least save — before committing

KiCad holds edits in memory and writes on save. Committing mid-edit captures a half-state that doesn't match what's on your screen. Closing also clears the lock file.

Commit the schematic and the layout together

.kicad_sch and .kicad_pcb share net and footprint identity. A commit with a schematic change but no corresponding layout update is a broken state you cannot cleanly return to. One logical change = one commit spanning both files.

Do not expect merges to work on .kicad_pcb

This is the big one, and it surprises anyone arriving from software git.

Because the files are text, git will happily merge two divergent layouts — and can produce a syntactically valid file with nonsense geometry: overlapping footprints, traces to nowhere, silently dropped zones. That is strictly worse than a conflict, because nothing warns you.

So:

  • Branch freely for schematic experiments.
  • Keep layout work linear — one person, one branch at a time.
  • If layout diverges, redo it rather than merging it.

Version control here is excellent for history, review and rollback. It is not reliable for parallel layout editing.


3. Everyday workflow

bash
# after saving and closing KiCad
git status                 # confirm only design files changed
git diff                   # review — kicad files are readable text
git add -A
git commit -m "Add 3V3 regulator and decoupling"
git push

Tag revisions you actually send to fabrication:

bash
git tag -a rev-a -m "Sent to JLCPCB 2026-09-12"
git push --tags

A tag is what makes "which files did we build?" answerable a year later.


4. How this repo was set up

bash
cd ~/KiCad/projects/KiCad-git-tests
git init
git branch -m master main                      # match GitHub's default
# ... create .gitignore and .gitattributes ...
git add .
git commit -m "Initial commit"
git remote add origin git@github.com:Alex-Hermeling/KiCad-git-tests.git
git push -u origin main

5. Automated previews and visual diffs (GitHub Actions + KiBot)

WorkflowTriggerProduces
.github/workflows/kicad-export.ymlpush to mainSchematic SVG/PDF, PCB top/bottom PNG — uploaded as an artifact and published to the previews branch
.github/workflows/kicad-diff.ymlpull request into mainAn interactive KiRi diff of the schematic and PCB vs main, linked from a PR comment (updated on every push). Red/green PDFs are uploaded as an artifact.
.github/workflows/kicad-pages.ymlstarted by kicad-diff.ymlPublishes the KiRi sites to GitHub Pages
.github/workflows/repo-hygiene.ymlpull request into mainFails on lock/backup/personal files and warns on fab output (see section 1)

Each open PR gets its own page at https://alex-hermeling.github.io/KiCad-git-tests/pr-<number>/. The sites are stored on the pr-diffs branch and removed automatically when the PR is closed. The site root lists the open PRs.

KiBot settings live in .kibot/config.yml (previews) and .kibot/config_diff.yml (diff).

Latest render of main

The images below come from the previews branch, which the export workflow overwrites on every run. They appear after the first run.

Schematic (PDF)

Schematic

PCB

TopBottom
PCB topPCB bottom

Parts

2
QtyValueFootprintReferences
1LED_Dual_BidirectionalLED_SMD:LED_1812_4532Metric_Pad1.30x3.40mm_HandSolderD1
1RResistor_SMD:R_0612_1632MetricR1

Similar boards

  • 2 layers37 × 19 mmPassive rpi hub75-adapter, the printed circuit board in 3D

    Passive rpi hub75-adapter

    hzeller/rpi-rgb-led-matrix

    Controlling up to three chains of 64x64, 32x32, 16x32 or similar RGB LED displays using Raspberry Pi GPIO

    2 parts4.4kGPL-2.0
  • 2 layersDiode template, the printed circuit board in 3D

    Diode template

    adamws/kicad-kbplacer

    KiCad plugin for automatic keyboard's key placement and routing

    2 parts547GPL-3.0
  • 2 layers20.3 × 15.2 mmL0 button, the printed circuit board in 3D

    L0 button

    Luos-io/luos_engine

    Open-source and real-time orchestrator for cyber-physical-systems, to easily design, test and deploy embedded applications and digital twins.

    2 parts546MIT
  • 2 layers35.1 × 46.8 mmSDEX2M2 Breakout Board, the printed circuit board in 3D

    SDEX2M2 Breakout Board

    NVNTLabs/switch2-SDEX2M2

    Micro SD Express to M.2 NVME Adapter for Nintendo Switch 2

    2 parts542GPL-3.0
  • 2 layers59.3 × 36.6 mmExpansionBoardTemplate, the printed circuit board in 3D

    ExpansionBoardTemplate

    BlueSCSI/BlueSCSI-v2

    BlueSCSI v2/Ultra - an open source, open hardware, SCSI emulator using the Pi Pico PR2040 and Pico 2 RP2350

    2 parts459GPL-3.0
  • 2 layersAlpha.9mm.wire, the printed circuit board in 3D

    Alpha.9mm.wire

    ohmtech-rdi/eurorack-blocks

    Software to Hardware Prototyping for Eurorack using C++, Max/Gen~ or Faust

    2 parts410
  • 2 layers26.7 × 64 mmGpu power, the printed circuit board in 3D

    Gpu power

    dennisss/dacha

    Monorepo for awesome tools/projects/libraries

    2 parts397Apache-2.0

Questions

How big is the KiCad git tests PCB?

It measures 23 × 11.8 mm and has 2 copper layers, 1.6 mm thick.

What parts does the KiCad git tests use?

2 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the KiCad git tests KiCad files?

From the Alex-Hermeling/KiCad-git-tests repository on GitHub, at the commit this page was made from: the board is KiCad-git-tests.kicad_pcb and its schematic KiCad-git-tests.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the KiCad git tests design in my own project?

Its repository states no licence, so its author keeps all rights: ask Alex-Hermeling before reusing the design.