Git & Github (part 2)

So now that you have a git repository on your computer, and you can take snapshots of your project at any given time, lets talk about Github.

Github is a place to publicly store your repo on a server. When you do this, you have a backup of all of your commits, and other people can view/collaborate on your project. So how do you get your git repo from your computer onto github?

First, check your git and by opening the terminal and typing:

git config --get

You should see your name show up. Now type

git config --get

you should see your email show up. If you don’t see what you expect, do this:

git config --global "Your Name"

git config --global ""

You’ll definitely need a github account. Go make one (or log in). Make sure you use the same email address for github that have configured for git! You also need to set up an SSH key, which you can do by following this link

Alright, you’re ready to put your local repo onto github.

First, open your terminal and prove to github that you are in fact who you say you are by typing:

ssh -T

You should see a message like the following:

Sweet, Github now trusts you!
Ok, go to github and create a new repository (click your the + icon next your your username)
Give it a name and a description. Preferably the name should match the name of your directory on your computer. I’m calling mine homework_assignments. You probably don’t want to change any of the default options. Leave them as public and DO NOT check the box that says “initialize this repository with a README”

You should see a screen that contains this:

Screen Shot 2014-06-26 at 5.14.53 PM

You’ll want to follow the prompts for “Push an existing repo…”

From then on, whenever you make a commit from your terminal, can can simply type

git push

in the terminal from your git directory, and your commit will now be on github.


About Aaron Glasenapp

I am a freelance Web/Rails developer and a hard core recreational mathematician.

Leave a Reply

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

You are commenting using your 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

%d bloggers like this: