When contributing to OSS, your fork (origin) drifts from the source (upstream). Sync regularly.
One-time setup:
git remote add upstream https://github.com/org/repo
Sync routine:
git switch main
git fetch upstream
git rebase upstream/main # or `merge` if you don't want history rewrite
git push origin main
For feature branches:
git switch feature/x
git rebase upstream/main
git push --force-with-lease
GitHub has a "Sync fork" button that does the merge form for you, but doing it locally lets you rebase for cleaner history.
Stale forks (months behind) cause "this branch is N commits behind" warnings and silent test failures from API drift. Sync weekly minimum.