Using github on the mac for non-programmers

A quick and dirty tutorial for some friends of mine.

Needed software:

Nice to have:

  • Textmate: text editor.
  • GitHub account (for push rights).
  • GitX: Grapichal tool for commiting to local repo (OSX 10.5+).

Create account on github

Go to for an account.

Optional: Provide an SSH key for pushing changes.

Clone a Repo

My advice is to generate a special dir for the projects (mine is Rails).

Fire up the terminal and type:

    # Goto the dir
cd ~/Rails
    # if the repo is read only:
git clone git://
    # if you have push rights:
git clone
    # if you installed GitX (as mentioned above)

Adding changes

With the gitx program it’s easy to commit thanges to your local repo. When these are ready to commit to the master you sync it first with the HEAD and then push your changes.

    # get changes from the master repo to your local repo
git pull
    # push your changes
git push

Additional info:

If it’s a rails application you’re cloning, startup the server with

    # Copy database credentials, uses sqlite3 as default
cp config/database.yml.example config/database.yml
    # install required gems
rake gems:install
    # make tables
rake db:migrate
    # startup server at http://localhost:3000

and you will be able to use the application at http://localhost:3000


Comments are closed.