As the title suggests, this blogpost is all about setting up Git on your Windows machine and connecting it to Github.com, a great open source Git repository hosting service with social components!

There are several steps one have to follow. I present you an logical order so the whole setting-up process should work fine!

  • Download msysgit from http://code.google.com/p/msysgit/ This is the “Git for Windows” package. On the left side of the msysgit-Page choose either the netinstall- or the fullinstall-package. Download msysgit and install it on your machine. If the installprocess was successful you will see a BASH window like this below

image

Within the shell you`re able to use all Git features just by hacking in the appropriate commands.

  • After successful installing Git for Windows, head over to Github.com, create an account, if you don`t have one already and create a repository, give it a name and follow the Github instructions.
  • At some point you have to enter a public key. You can generate you a key by using the ssh-keygen command within the bash. Just type ssh-keygen –t dsa for example. A dialog like the following appears

Generating public/private rsa key pair.
Enter file in which to save the key (/Users/cordellcp3/.ssh/id_rsa): <enter>
Enter passphrase (empty for no passphrase): <enter>
Enter same passphrase again: <enter>
Your identification has been saved in /Users/cordellcp3/.ssh/id_rsa.
Your public key has been saved in /Users/cordellcp3/.ssh/id_rsa.pub.
The key fingerprint is:
50:43:77:c6:97:af:61:82:dc:ea:9b:6b:67:d4:1b:61

  • It automatically adds a new entry in your known_hosts file. Now switch to your .ssh/ folder and open your generated id_rsa.pub file and copy the complete line ssh-rsa AAAA… to the clipboard. After that head over to GitHub.com, click on “Account Settings”, choose SSH Public-Keys and past your copied content in, save it and your done!

I hope that this post is a help for someone, who wants to start using Git and Github Smiley

There are also PlugIns for Visual Studio (2008, 2010) like Git Extensions or Git Source Control Provider.