Fetch every remote with fetch.all
Make plain git fetch update your fork and upstream, then check the remote tracking branches before you integrate changes.
You have a fork named origin and the project you forked named upstream. You run git fetch and look at upstream/main, but a commit you saw on the project’s site still isn’t there. Check which remote Git fetched before you start looking for the commit.
Fetch both remotes by default
When you give git fetch no remote, Git selects one from the branch’s configuration and falls back to origin when the branch has no configured remote. In a fork that usually leaves the other remote’s tracking branches where they were.
With Git 2.44 or later, set fetch.all in the clone where you want to refresh both.
git config --local fetch.all true
git fetch
git branch -rGit fetches origin and upstream. Then git branch -r lists their remote-tracking branches. If upstream/main advanced, the fetch output shows its old and new commit IDs.
The setting goes in this clone’s Git configuration. It is local to the clone and can be set differently by each contributor. Start there if you have a mix of single-remote projects and forks.
Ask for one remote when you need one
Use git fetch upstream to refresh just the project you forked. An explicit remote takes precedence over the default. Use git fetch --no-all to let Git choose one remote from the current branch’s configuration for this invocation.
If a remote is missing from the all-remotes output, run git remote -v to confirm you added it under the name you expect. Then check git config --get remote.upstream.skipFetchAll. A remote with that setting enabled is skipped by the all-remotes operation. You can still name it with git fetch upstream.
Check the tracking branch before integrating
Fetch updates refs such as upstream/main according to the remote’s configured fetch refspec. Your checked-out branch stays in place with a standard clone configuration. This gives you a chance to see what you gained before you rebase or merge.
To list commits on the project’s main branch that your current branch lacks, run git log --oneline HEAD..upstream/main. If Git says upstream/main is unknown even after a successful fetch, check git config --get-all remote.upstream.fetch. Its refspec may limit the set of branches you track. For a normal fork you should see the remote’s branch refs mapped under refs/remotes/upstream/.