DO NOT BE AFRAID
We are (finallly) switching over to Git for source code management. Don't worry - it's actually easy to learn, and the day-to-day usage is fairly similar to Subversion.
This guide is a work-in-progress, so please edit and improve it!
git push origin could add some great info that
will help new developers make the transition.
We're all in a hurry, so here are the steps you'll need to follow to get up and running with git.
- Create an account at github.com.
- Ask John to link your github.com account to the Lumos Labs organization. This will give you access to our private repositories.
A couple of important notes about SSH keys:
If you already have an SSH key for access to our servers, please create a different key to use for Github access. You can use
ssh-keygen -t dsato do this, using something like
github_dsafor the name of your identity file.
Then, edit the file $HOME/.ssh/config (or create if it doesn't exist) and add the following lines to tell ssh that it should use your custom github key when connecting to their servers:
Host github.com IdentityFile ~/.ssh/github_dsa
Please add a passphrase to your SSH key. This is less inconvenient than it sounds, at least on OS X, because the system's keychain app will store your password. To add a passphrase to an existing key, use
Clone the lumoslabs/lumos_sandbox repo (this one!) onto your local machine:
git clone firstname.lastname@example.org:lumoslabs/lumos_sandbox.git
Play around! Get comfortable with the normal git workflow:
- modify and create files in this sandbox repo
- stage the changes for commit (
git add <file>)
- commit the changes to your local repo (
- push the changes to the remote repository (
- fetch and merge other developers' changes into your repository (
There's obviously much more to learn about git, but this much should at least get you up and running.
These are left as exercises to the reader. Feel free to modify this README with notes on how to do any of the steps!
- Read about the fundamentals of how git works
- Create a branch and push it to a remote repository.
- Merge a branch back into the master branch.
git rebaseto squash multiple commits into a single commit.