When collaborating with other people using Github’s “fork & pull” collaboration model, it is a real PITA to have to re-fork and re-merge upstream repository changes all the time. The solution is to set your “forked” repository to use different pull (fetch) and push repositories. This way one can always pull/update from the upstream but keep pushing own changes (AND the upstream updates) to the forked repository of his own. This single, simple (when you know it and you know how to do it) step makes a major change in the efficiency and perception of the “fork & pull” collaboration model.
In case the original post disappears from the net – here is the extract (authorship and copyright of the original author duly acknowledged):
First of all you need to set the remotes url to the one of main repository (the one you forked from):
git remote set-url origin git://github.com/chief/global.git
Then you set the push url of that remote to your’s (forked) repo:
git remote set-url --push origin firstname.lastname@example.org:User/forked.git
Yeah, it’s weird that you can’t set the different pull url by itself, just a push one. Anyways, now we have our awesome remote config:
git remote -v origin git://github.com/chief/global.git (fetch) origin email@example.com:User/forked.git (push)