Updating a forked repository to the original repository
Making the work mine.
August 05, 2022 • Code
1. Add remote with the original repository url - name it “upstream”
git remote add upstream https://github.com/original-repo/example.git
2. Fetch all the branches and content of remote upstream
git fetch upstream
3. Need to rewrite the master with upstream’s master using git rebase
- Also need to make sure that you are on the master branch:
- git checkout master
git rebase upstream/master
4. Push the updates to local master (may need --force)
git push origin master
Also, some great content about How to GitHub: Fork, Branch, Track, Squash and Pull Request