A quick and dirty tutorial for some friends of mine.
- git-osx-installer: Full native OSX git client.
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 http://github.com 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
Fire up the terminal and type:
# Goto the dir cd ~/Rails # if the repo is read only: git clone git://github.com/LeipeLeon/facebooker.git # if you have push rights: git clone firstname.lastname@example.org:LeipeLeon/facebooker.git # if you installed GitX (as mentioned above) gitx
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
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 script/server
and you will be able to use the application at http://localhost:3000