Like many I forked a repository from GitHub in order to work on it. After a while I needed to update my version with commits and updates from the original repository. In a brief search in the internet I came into the same question at stackoverflow.

As the answer declares:

Once the clone is complete your repo will have a remote named “origin” that points to my fork on GitHub. To keep track of the original repo I will need to add another remote named “upstream”:

$ cd my-forked-repository-name
$ git remote add upstream git://github.com/original-creator/original-repo-name.git
$ git fetch upstream

# then: (like "git pull" which is fetch + merge)
$ git merge upstream/master master

# or, better, replay your local work on top of the fetched branch
# like a "git pull --rebase"
$ git rebase upstream/master

upstream