Interview Prep/Git & GitHub/GitHub, Actions and Pull Request Issues

After your PR was merged and the branch auto-deleted, `git pull` says `Your configuration specifies to merge with the ref 'refs/heads/feature/login' from the remote, but no such ref was fetched.`

BeginnerTroubleshootingGitHub, Actions and Pull Request Issues
Answer

Likely causes → Your local branch still tracks origin/feature/login, which was deleted on GitHub after the merge.

Diagnose → git branch -vv shows [origin/feature/login: gone].

Fix →

git switch main
git pull
git branch -d feature/login       # -D if it was squash-merged
git fetch --prune

Prevent → Switch back to main after merging and enable fetch.prune=true.

All Git & GitHub questions Roadmap: Git & GitHub

More on GitHub, Actions and Pull Request Issues