Insights and outlooks on software development


On getting started with git & github

Saturday, May 16, 2009 by Thomas L

More or less notes for me: this is what you need to do to clone a repository hosted on github.

What is git? Watch e.g. this video.

Install git

There are installation packages for Mac and Windows, install either of those.

Configure git

Since git needs your name and e-mail address for everything, we have to add it to the global configuration. Run the following commands
git config --global "Your Name Here"
git config --global

Get a github account

Not that much to say about this.

Generate ssh keys

In a terminal (Mac) or the git bash (Windows), run
ssh-keygen -C "" -t rsa
to generate ssh keys for you (use the same e-mail as you added to the global git config). This will place to files in the ~/.ssh folder; id_rsa and The id_rsa is your private key, and the is your public key. This means that you should give your public key to github, and when you do anything with github, your private/public key pair will guarantee that you are you. Let's continue with that.

Upload your public keys to github

This can be done in the account management interface. You should add one public key for each computer that you use against github. The entire contents of the should be added (including e-mail addresses etc).

Clone a repository

Now everything should be set to start using github. In a terminal/git bash, run e.g.
git clone git://
This will clone the IronRuby sources so you have it on your computer, and can start committing to the project.

Filed under , , having  

0 kommentarer: