influxweb
3/15/2017 - 4:30 PM

How to update a GitHub forked repository? — First published in fullweb.io issue #91

How to update a GitHub forked repository? — First published in fullweb.io issue #91

How to update a GitHub forked repository?

So you hit "Fork" and now you have this repo copy on your Github account. Here is what to do to keep it up-to-date with the original repo.

1. Add the original repo as remote, here called upstream:

git remote add upstream https://github.com/author/repo.git

2. Fetch all the branches of that upstream remote:

git fetch upstream

3. Merge an upstream branch:

git merge upstream/master

There can be variants to this process, please let me know what you think and the best practices you follow.