Search notes:

Sync forked github repository

After forking the repository:
git clone https://github.com/FORKING_USER/repo
cd repo
Add the remote. Note the final .git in the URL:
git remote add upstream https://github.com/ORIGINAL_OWNER/repo.git
git remote -v
git fetch upstream
Checkout desired branch
git checkout master # or main, or xyz
git merge upstream/master # or main, or xyz …
git push

Index