Setting up Git/GitHub on Windows

I have a Vista machine and i needed to set up Git and GitHub in order to finish my processing.js project.

What is Git and GitHub? Basically it is an online code sharing community that uses repositories to maintain code versions.

What will u need to do?

  1. Set up a free account on the GitHub social network and a repository
  2. Download and install Source Code Management tool
  3. Link the two together

Set up a free account

Sign UP

Sign UP

 

  • Click “Sign Up” in the Open Source table
Free Option

Free Option

  • Fill in the registration form (leave SSH Public Key blank)

Setting up a repository

So there should only be one code repository per project. If a repository DOESN’T exist u can create one. However, if it DOES exist then you have to fork it.

FORK: By forking a project instead of cloning, creating a new GitHub repo, and pushing to it, you allow us to create a link between your fork and the original. This link helps us keep you informed of changes to the original codebase and make it trivial for you to notify the originator of changes that you have made and would like have reviewed.

For the purpose of my setup, I will be forking an existing processing.js repository

  • If u are not logged in (to GitHub), log in. This will bring u to the home page, if not click on the GitHub Social Coding logo on the upper left corner of the page.
GitHub Home

GitHub Home

  • Click on “Find a Repository”
  • Type “processing.js” in the search textbox (don’t change any defaults) and press enter
Search For Repository

Search For Repository

  • Select the “jeresig/processing-js”  Repository
  • Select the “fork” button (found beside the repository name)
Fork

Fork

Download and install Source Code Management tool

For windows, you can use cygwin or msysgit. I am using msysgit.

  • Download the latest version from Google Code. Run the executable
  • Press “Next” for most of the configuration except for the following screens:
Git Configuration

Git Configuration

Git Configuration

Git Configuration

Git Configuration

Git Configuration

  • Once Setup is complete, you can generate your SSH key. Open up the msysgit cmd: Start=> Search for “Quick Launch” folder => right click => Select “Git Bash Here”
Quick Launch

Quick Launch

  • The command window should open up. Type ssh-keygen -C “youremailinquotes@com” -t rsa to create a key. Here is another tutorial on SSH Keygen.

SSH Key

SSH Key Gen

Note: You do not need to put in any input after the ssh-keygen command, just press enter after every prompt.

  • Identify yourself on Git using these two commands:

  1. git config –global user.name “yournameinquotes”
  2. git config –global user.email youremail@com
  • Tell GitHub apps about u. Log into GitHub, select “Account” (top right corner), select “Global Git Config”. Copy and paste the commands in the pop-up into the Git Bash command prompt.
Git Blobal Configuration

Git Blobal Configuration

Link the two together

  • Add SSH key you just created into GitHub. Open SSH key in a text editor.  Looking back at the ssh-keygen command, you identified “C:\Users\YourNameHere\.ssh\” as the path. Open this folder (it might be hidden). Open id_rsa.pub in a text editor and copy its entire contents.
  • Go back to your GitHub Account and just under the “Global Git Config” we used 2 steps above u will find the “SSH Public Key” Section. Click “Add a Key” and paste the SSH key into the “Key” textarea. DO NOT include any extra spaces. You can leave the “Title” blank if u wish. Don’t forget to press “Add Key”
Add the SSH Key

Add the SSH Key

  • Test to make sure that everything works. On the Git Bash command prompt type the following command: ssh git@github.com I got a connection confirmation prompt and I had to type yes.

Verification

Verification

  • Get the actual code in the Repository using this Git Command: git clone git://github.com/annasob/processing-js.git processing
  • To get the path of ur repository: Log into GitHub. On the homepage click on the Repository you want to clone. Once the repository information comes up look for “Public Clone URL” or “Your Clone Url”

 

View all of my blogs on GitHub
View all of my blogs

About these ads

14 thoughts on “Setting up Git/GitHub on Windows

  1. Awesome! I’m glad I could help out and this should help out anyone having trouble using it on Windows. It’s a lot easier on Linux as it can come built in already. Great work.

  2. Pingback: OSD600 (Bugzilla & Setting Up Git/GitHub) « Xudiera's Blog

  3. Pingback: GitHub Bug « Anna on Stuff (Processing.js/Open Source)

  4. Pingback: Adding new Code to your GitHub Repository « Anna on Stuff (Processing.js/Open Source)

  5. Just wanted to add:

    it’s –global

    1. git config -–global user.name “yournameinquotes”
    2. git config -–global user.email youremail@com

  6. Pingback: processing.js unhex() and GITHUB « Daniel Hodgin's Blog

  7. Pingback: A guide to git for the processing.js community (6 easy steps) « Daniel Hodgin's Blog

  8. Pingback: Getting Started « Matt's Blog

  9. Pingback: Installing Git on Max OS « Anna on Computing

  10. Pingback: Git Gui « The Crazed Mind of an Aspiring Developer

  11. Pingback: A guide to git for the processing.js community (6 easy steps) | Hodgin.ca

  12. Pingback: Got the Git work… | Min

  13. Pingback: Getting started with contributing to Processing.js or Popcorn.js « Scott Downe's Blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s