In this thread on Stackoverflow you’ll find an easy method to pull new/updated code from an original repository to your local fork:
# Add this in a terminal in the relevant directory:
git remote add upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.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
After adding the upstream you only have to run the merge or rebase command now and then – whenever you know or suppose that the code was updated.
Leave a Reply