Interview Prep/Git & GitHub/Push, Pull and Fetch Errors

`git pull` says `Already up to date.`, yet teammates' new commits are visible on GitHub.

AdvancedTroubleshootingPush, Pull and Fetch Errors
Answer

Likely causes → Your branch tracks the wrong upstream, the fetch refspec is narrowed to certain branches, you are on a different branch, or the remote URL points to a fork or mirror.

Diagnose →

git remote -v
git config --get-all remote.origin.fetch
git branch -vv
git fetch origin --verbose

Fix → Reset the refspec to +refs/heads/*:refs/remotes/origin/* (git remote set-branches origin '*'), correct the URL, and fix tracking with git branch -u origin/<branch>.

Prevent → Avoid hand-editing .git/config, and use --single-branch clones only when you mean it.

All Git & GitHub questions Roadmap: Git & GitHub

More on Push, Pull and Fetch Errors