-
cd
into the forked repository directory that you want to updatecd repository_dir
-
Add a new remote to point to the original repository
git remote add upstream git://github.com/author/project.git
-
Pull the new commits from the original repo
git fetch upstream
-
Merge the upstream commits with the forked local repo
git merge upstream/master master
-
replay your local work on top of the fetched branch
git rebase upstream/master
(or)
Instead of 3, 4 & 5 steps use git pull --rebase