Keeping Your GitHub Fork Up-To-Date


This is a quick tip: after forking a repository on GitHub sadly there is no button to easily fetch new commits from the original repository. So we have to do it manually. Luckily this is easy enough:

1. Add the original repository as a remote to your local clone:

$ git remote add openlink git://github.com/openlink/virtuoso-opensource.git

2. Now you can simply pull the changes from the original:

$ git checkout develop/6
$ git pull openlink develop/6

However, make sure you do not do a rebase pull with the pull as that would destroy any merges you did on your own fork.

3. Finally push them to your own fork:

$ git push origin develop/6

I am sure that for most git users this is trivial. I just wanted to clearly state that there is no difference when using GitHub. It does not provide us with any magic when it comes to fork updates.

One thought on “Keeping Your GitHub Fork Up-To-Date

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s