Electronics > KiCad
How do you do PCB version control with KiCad?
rhodges:
I am just getting started with KiCad (and love it.) Before I start bad habits, I am interested in how others handle project version control.
I use git for all my code, and am comfortable with it. Would git work well for KiCad? Or would it be better to just copy a project into a new folder and resume? (Or copy the files into an archive folder?) Other options?
Thanks!
SiliconWizard:
git or any VCS works fine for KiCad. If you're already comfortable with it, you can use it for KiCad, absolutely.
Just be careful about any kind of auto-merging - KiCad files are text files and thus depending on how you use git, you may find yourself in situations where it will merge files and it may lead to really unexpected results. Other than that, no problem.
Alternatively you can of course manually version your KiCad projects and archive them for each version. KiCad has a "Archive Project..." menu option which does that for you in a zip file.
No need to copy files around manually.
Doctorandus_P:
Git does work quite well for archiving KiCad files, but KiCad still moves some things around in their files, so diffs are bigger then they could have been, and autmatically merging from git does not work. (Although some work has been done to improve this).
It is also possible to review diffs with a visual comparison. There are a lot of side projects around KiCad (could well be 100+) and I once saw a project that created bitmap pictures of different versions the schematic or PCB and then did a colored overlay to see the differences.
A quick search:
https://duckduckgo.com/?t=h_&q=KiCad+visual+diff&ia=web
Shows (among other results):
https://hackaday.com/2018/09/19/visual-schematic-diffs-in-kicad-help-find-changes/
rhodges:
--- Quote from: SiliconWizard on August 09, 2023, 09:45:35 pm ---Just be careful about any kind of auto-merging
--- End quote ---
I would not consider the idea. My modest board has more than 12K lines in the PCB file and over 3K in the schematic. No way could I manually merge anything. I would treat the KiCad files as opaque blobs.
--- Quote from: Doctorandus_P on August 09, 2023, 10:35:12 pm ---Git does work quite well for archiving KiCad files, but KiCad still moves some things around in their files, so diffs are bigger then they could have been, and autmatically merging from git does not work.
--- End quote ---
As I expected. Thank you both!
bson:
git is fine. I'd suggest setting up .gitattributes for file types that are effectively unmergeable. But you can still allow diffing them for clues as to what has changed in commits since none of them are binary. Use tags to name versions when you send off gerbers; this lets you easily checkout the files for the actual version of a board you have in front of you.
Navigation
[0] Message Index
[#] Next page
Go to full version