Update forked repository using git rebase
To be able to make a pull request to an open source project, one might need to update the forked repository. This can be done using git rebase using the following steps:
-
Add the remote original repo as upstream to your local repo
git remote add upstream <original repo> -
Fetch all the branches from the remote upstream
git fetch upstream -
Rebase local master with upstream’s master
git rebase upstream/master -
Update your forked repository master by pushing the rebased branch
git push origin master