update fork repo github code example
Example 1: update fork repository
git remote add upstream https://github.com/OriginalOwner/OriginalProject.git
git remote -v
git fetch upstream
git checkout master
git merge upstream/master
git push origin master
Example 2: how to update forked repo in GitHub
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
git pull upstream master