You fork a GitHub project, how can you sync it with the new changes?
You fork a GitHub project and now there are some new changes added to the project. You want to sync your fork with the original project. How will you do it?
1. Clone the fork locally
git clone
2. Set the original repo as your upstream repo
git remote add upstream
3. Change back to the default branch
git checkout main
4. Fetch the new changes
git fetch upstream
git merge upstream/main
5. Push changes to update your fork main on Github
git push origin main
In case more references needed, check out the official the documentation
Thank you for reading this post, stay tuned for my next blog posts.
You can find me on Twitter, LinkedIn and Github.✨