Wednesday, May 30, 2012

Remote Repositories and GitHub

It's nice to be able to have version control by yourself, but what if you want to share your code with others? This is where remote repositories come in, and GitHub is one of the best.

Github Setup

There's a great tutorial here. Skip the first and last steps: "Download and Install Git" and "Set your GitHub Token"

Create a Repository

Make a remote repository on GitHub by following the directions here.

Git pull and push

There are now two additional commands that you will be using frequently:
git pull [options] [ [...]]
You can go to the link to see a full manual, but in essence this updates your local copy with the changes in the remote repository. Just running
$ git pull
Should suffice in most cases.
git push [options] [ [...]]
This pushes your local commits to the remote repository. After everything has been committed, just running
$ git push
Should suffice in most cases.

AITI Specific Instructions

It's now time to check out the labs. Go to your home directory
$ cd ~
And run
$ git clone
All the labs from now on will be in
Whenever there are new changes to the labs, or labs are added, run:
$ cd ~/AITI-2012
$ git pull

No comments:

Post a Comment