This tutorial will show you how to use git and Github to store, version, and collaborate on Eagle CAD designs.
To start, you probably already have a directory that contains your design files. In this tutorial we'll assume the following directory structure:
my-project/ my-design.brd my-design.sch
Firstly, you'll want to initialize git in your directory. Ensure that you have git installed (see here for instructions). Then open a terminal such as
powershell on Windows. Then run the following commands:
cd my-project git init .
This will setup an empty git repository inside the
Next, add your design files to git:
git add my-design.brd my-design.sch
Note: You may have automatic backups of your design files created by Eagle. This will have extensions such as
.b#9. You should not commit these files to git. See here for information on setting up a gitignore file.
Now, commit those files to git:
git commit -m"Add Eagle design files"
Next, you'll need a Github account. You can skip this step if you already have an account.
To sign up go to https://github.com/join and create an account. Be sure to verify the email on the account.
In Github, create a new repository by clicking the
+ button at the top of the site.
Give your repository a simple but descriptive name (ours would be "my-project"). Don't initialize with a README, license, or gitignore for now.
Use the instructions on your now-empty repository to push to your repo. This will look something like:
git remote add origin email@example.com:/<your-username>/<your-repo> git push -u origin master
That was easy. In this quick tutorial we initialized a git repository with your design files and pushed that repository up to Github where Cadstrom will be able to find it. When you subsequently make changes be sure to add and commit the changed files like in Step 1.
Next step: Setup Cadstrom