GitHub: Forking a project
In honor of the launch, here’s a quick rundown of forking a repository to start hacking away.
First navigate to the repository, and click ‘fork’.
Give it minute while the hardcore forking action happens. Now you have your own fork of the repository.
Here you can see your clone/push URL. So we should go ahead and clone it:
git clone email@example.com:technicalpickles/shoulda.git
So we have a checkout now. As is, it’s kind of detached from the official repository. If we’re going to be actively working on it, we should add the official repository as a remote.
cd shoulda git remote add official git://github.com/thoughtbot/shoulda.git
From now on, we should be able easily pull in the changes:
git pull official master
So now what? Get hacking of course. But how do send our changes back? Well, this is a tricky question. There are several ways, but it mostly depend on those receiving the changes back. As people get more comfortable with git, I think we’ll start to see some best practices emerge here.