-
Notifications
You must be signed in to change notification settings - Fork 772
How To Set Up Git
Install msysgit from http://code.google.com/p/msysgit/downloads/list (I used Git-1.7.3.1-preview20101002.exe)
Installation Options:
- Select Components: You should disable the Windows Explorer integration, we'll use TortoiseGit instead
- PATH: "Run Git from Windows Command Prompt"
- Line endings: "Checkout Windows-style, commit Unix-style"
Then install TortoiseGit from http://code.google.com/p/tortoisegit/downloads/list (I used TortoiseGit 1.6.2.0)
When asked about Putty vs OpenSSH, please make sure you choose OpenSSH. github only accepts OpenSSH keys; when using Putty you'd have to convert your public key.
Now you'll have to set some options:
- Right-click in explorer, TortoiseGit > Settings
- Pick the Git > Config page.
- Here, put in your name and email
- Make sure "AutoCrlf" is selected (it should be if you installed according to the steps above)
- Press OK to save the options.
Now you need to create an SSH key (if you already have one, I assume you know SSH and can figure out yourself how to reuse that)
-
Start "git bash" (msysgit installed this into the start menu)
-
Run the following command to generate an OpenSSH key: ssh-keygen -t rsa -C "[email protected]"
-
Press Enter to accept the default location to store the key.
-
Press Enter two more times to create a key without passphrase (alternatively, read http://help.github.com/working-with-key-passphrases/).
-
Now find your public key file (id_rsa.pub, ssh-keygen will tell you where it was saved to) and open it in a text editor.
-
Then open your github account settings (https://github.com/account#ssh_bucket) and click "Add another public key".
-
Copy the contents of the file into the "Key" textbox. (you can leave the "Title" empty)
-
Verify that you picked your public key (*.pub file extension) and aren't accidentally uploading your private key.
-
Then click "Add key" to add the key to your account.
Finally, let's clone the repository:
- Use Right click > Git Clone in Windows Explorer.
- As source URL, use "[email protected]:icsharpcode/SharpDevelop.git" (this is the read+write URL for committers).
- You'll have to press "Yes" to accept github's SSH fingerprint (it should be the same as mentioned on your github account page)
- Press OK.
- Once the download finishes, you'll have a working copy where you can start developing.
- If the download fails with a "Permission to icsharpcode/SharpDevelop denied to USER" error, that's likely because your github account does not have commit access. Please mail your account name to Daniel or Christoph. If you are not a SharpDevelop contributor, use the download URL for read-only access.