Git Your PCBs Online

Last time, I’ve shown you how to create a local Git repository around your PCB project. That alone provides you with local backups, helping you never lose the changes you make to your files, and always be able to review the history of your project as it developed.


However, an even more significant part of Git’s usefulness is the ability to upload our creations to one of the various online Git repository hosting services, and keep it up to date at all times with a single shell command. I’d like to show you how to upload your project to GitHub and GitLab, in particular!



Recap


First off, let’s recap what goes into creating a repository. Here’s a sequence of commands you can refer to – these commands have been explained in the last article, so they’re here in case you need a cheatsheet.


# setting up identity - these are public, and can be fake
git config --global user.name "John Doe"
git config --global user.email [email protected]
# initializing a repository
git init .
git branch -M main
# before your first commit, you add your .gitignore file
# then, add files as needed - use 'git status' to check in
git add board.kicad_pcb
[...]
git add README.md
# or, given proper .gitignore, you can just do this:
git add .
# put your added changes into a commit
git commit
# an editor will open to write your commit message

What if you don’t happen to have a PCB project handy? Here’s a repository with a Jolly Wrencher SAO board that you can download it as a .zip archive thr ..

Support the originator by clicking the read the rest link below.