To bring the latest changes from the original repository (also called the "upstream") into your fork, follow these steps:
If you haven’t already, add the original repository as a remote called upstream:
git remote add upstream <original-repo-URL>Retrieve the latest commits from the original repository:
git fetch upstreamSwitch to your local main branch (or whichever branch you want to sync):
git checkout mainMerge the changes from upstream/main into your local branch:
git merge upstream/main
⚠️ If there are merge conflicts, Git will prompt you to resolve them manually. Use your code editor to fix the conflicts, then stage and commit the resolved files.
Finally, push the updated branch back to your GitHub fork:
git pushFollowing these steps ensures your fork stays up-to-date with the original repository.