Last Updated: February 25, 2016
·
796
· goldstift

Update a forked repository at Github

Situation:

You forked a repository at Github some time ago and now you want to update your fork with the commits which have been pushed to the origin repository in the meantime.

Obviously you can't open a command prompt and send a "git pull origin master". So what can you do to get these commits?

Solution 1)
Delete your fork and start over from a clean plate.

Solution 2)
Create a pull-request from the origin repository to your forked repository. This pull-request will be the same as if you had send a "git pull origin master" which means it might introduce another merge commit. If you need to avoid this, you'll unfortunately have to use "solution 1)".

See here for an example of a reverse pull-request (https://github.com/aheusingfeld/statuses/pull/1) after my pull-request (https://github.com/innoq/statuses/pull/54) had been merged.