Update a forked git repository from the upstream repository
With open source projects, it is common practice to fork the original repository, to be able to try the code and make changes.
In case you need to update your forked copy of the original repository, here are a simple sequence of commands to update the master branch:
git fetch upstream
git rebase upstream/master
git push origin master --force
git rebase upstream/master
git push origin master --force
At the end there is a push command to push the update to origin for your repository.
Comments
Post a Comment