To update or sync a forked repository on GitHub, you can follow these steps:

Add the original repository as an upstream remote by running the following command,Replace <original-repository-URL> with the URL of the original repository you forked from.

git remote add upstream <original-repository-URL>

Fetch the latest changes from the upstream repository by running the following command:

git fetch upstream

Checkout your local master branch by running the following command:

git checkout master

Merge the changes from the upstream repository into your local master branch by running the following command:

git merge upstream/master

Push the changes to your forked repository on GitHub by running the following command:

git push origin master