Based on Alex’s comment on the Leiningen group, here’s my shiny new setup for working with Git & GitHub on OS X, I’m posting it here then it’ll be easy for me to refer back to in future…
Installing the Tools
- install MacPorts if you don’t already have it;
- get an up-to-date version of ruby and rubygems with
sudo port install rb-rubygems
; - install the
github
tool withsudo port install json github
; and - upload your public key to your GitHub account.
Creating a New Project
Run github create project_name
to create a public project, append --private
to create a private project (you will need a paid account at GitHub for
this).
Forking
Run github fork project_owner project_name
, for example to create a fork of the Cucumber testing
framework run github fork aslakhellesoy cucumber
.
Making Changes
Make your changes in a branch, this took me a little while to get used to at first as it’s different from the normal way of working with version control systems like CVS:
1 2 3 4 |
|
From time to time push the branch to github
so others can see what I’m working on git push origin feature_name
.
If the work is in a fork then you’ll also want to send a pull-request
back to the original project with github pull-request project_owner feature_name
. All from the command line, neat huh? For more tricks,
you can also browse issues with github issues {open|closed}
.