-
Notifications
You must be signed in to change notification settings - Fork 503
Configuring Git and Eagle PCB Editor
I put together a guide for configuring your computer and Eagle for utilizing github and starting version controls for hardware projects. Check it out after the jump.
First and foremost download and install Git. We’ll be working with Version 1.6.6 on OSX 10.5.6 (but that shouldn’t really make a difference). If you don’t want to have to type your password every time, you’re going to want to generate an ssh public key. Next create a (free) open source account with github, if you generated a public key enter it in here.
Now we’re going to get into the part of this whole project that (I hope) will really make a difference. Eagle seems to be the defacto standard for open source electronics projects. We’re going to be working with two different repositories. One for libraries and another for projects. Our libraries repository will live inside the lbr folder in the default eagle installation directory (EAGLE/lbr/). The initial repository that is I configured contains my own custom library for Pumping Station: One, the Sparkfun library from Open Circuits, and the ftp archive of submitted libraries from Cadsoft.
You can start with the library I created and download it into your own library folder, or make a fork to contribute back to this whole project by clicking on the fork button on my project page.
Git is a terminal application, so open up terminal (Applications→Utilities→Terminal) and navigate to the Eagle application directory (Use tab to auto complete).
cd /Applications/EAGLE/lbr
If you’re starting from my project with a fork continue on otherwise check out using a blank library.
Git is a terminal application, so open up terminal (Applications→Utilities→Terminal) and navigate to the Eagle application directory.
cd /Applications/EAGLE/lbr
Next you’re going to clone your forked git repository to the library folder
git clone git@github.com:<your user name>/Eagle-Libraries.git
Initialized empty Git repository in /Applications/EAGLE/lbr/Eagle-Libraries/.git/ remote: Counting objects: 1087, done. remote: Compressing objects: 100% (1050/1050), done. 100% (1087/1087), 12.55MiB | 45 KiB/s%
From there everything should be ready to roll. You can use, edit, create as you wish. Any changes that you make will not be added back to your repository until you commit changes
git commit -m "Enter a message to describe what changed"
And then push them to the server
git push origin master
If you want to add specific files or entire folders and subfolders to your fork
git add <filename> git add .
You should now be all set to finish up configuring Eagle and have fun with git versioning your parts libraries from a forked repository, skip down to Configure Eagle to finish up.
Create a new folder that matches the corrisponding github project and move into it
mkdir Eagle-Library cd Eagle-Library
Initialize your folder
git init
Initialized empty Git repository in /Applications/EAGLE/lbr/Eagle-Libraries/.git/
Assign the git folder to a repository on github
git remote add origin git@github.com:<your user name>/Eagle-Libraries.git
Create a dummie readme file and add it to the repository
touch README git add README
Commit your first file to the repository
git commit -m 'first commit'
And finally send it to the server
git push origin master
If you want to add specific files or entire folders and subfolders to your fork
git add <filename> git add .
You should now be all set to finish up configuring Eagle and have fun with git versioning your parts libraries from a forked repository.
After you’ve got your git repository up and running you’re going to want to configure eagle. Files included in the library folder aren’t enabled by default. You’re going to have to go through and make sure you select “Use All” for the subfolders provided so the little green dot appears to the right side next to libraries in the Control Panel. Skip lbr-depricated though, those are old files that are no longer compatible with eagle.
This setup step is a pain in the neck, but it’s the only way to make sure Eagle doesn’t choke when you want to edit a library. When you expand a folder, Eagle analizes all of the files inside of it for compatibility and then gives warning messages when things aren’t right, there are about 950 functional libraries, it’s a lot to scan through. Now that everything’s available you’re ready to go. Go out into the world, add parts, create things and do good things!