-
-
Save sethfischer/c611e5f0c8abb5c403f587d36b34048d to your computer and use it in GitHub Desktop.
KiCAD git setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
git init | |
cat << EOF | tee .gitignore | |
# For PCBs designed using KiCad: http://www.kicad-pcb.org/ | |
# Format documentation: http://kicad-pcb.org/help/file-formats/ | |
# Temporary files | |
*.000 | |
*.bak | |
*.bck | |
*.kicad_pcb-bak | |
*.kicad_sch-bak | |
*.kicad_prl | |
*.sch-bak | |
*~ | |
_autosave-* | |
*.tmp | |
*-save.pro | |
*-save.kicad_pcb | |
fp-info-cache | |
# Netlist files (exported from Eeschema) | |
*.net | |
# Autorouter files (exported from Pcbnew) | |
*.dsn | |
*.ses | |
# Exported BOM files | |
*.xml | |
*.csv | |
# Fabrication outputs | |
*.gbr | |
*.gbrjob | |
*.drl | |
*.step | |
EOF | |
cat << EOF | tee .gitattributes | |
*.pro filter=kicad-project | |
*.sch filter=kicad-schematic | |
EOF | |
git config filter.kicad-project.clean "sed -E 's/^update=.*$/update=Date/'" | |
git config filter.kicad-project.smudge cat | |
git config filter.kicad-schematic.clean "sed -E 's/#(PWR|FLG)[0-9]+/#\1?/'" | |
git config filter.kicad-schematic.smudge cat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment