git clone <url>
git remote add origin <url>
git remote add upstream <url of forked repo>
git fetch upstream
With the rebase command, you can take all the changes that were committed on one branch and replay them on another one
git checkout b
git rebase upstream/master
-Applies changes of master branch of remote upstream on the branch b.
git push origin master
You might want to keep a copy of local work first:
git commit -a -m "Saving my work, just in case"
git branch my-saved-work
And then:
git reset --hard upstream/master
git fetch upstream pull/PR_Number/head:branchName
git checkout branchName
git checkout --