After a PR merged and the branch was deleted on GitHub, `git pull` complains about your branch.
BeginnerScenarioRemotes, Collaboration and Pull Requests
Answer
Situation read → Your local branch tracks a remote branch that no longer exists ([gone]).
What I'd do →
git fetch --pruneclears the stale remote-tracking ref.git branch -vvshows branches marked: gone].- Delete them:
git branch -D old-feature. - Set
git config --global fetch.prune true.
Why → Git never deletes remote-tracking refs unless asked.
Interview tip → A one-liner to clean all gone branches is useful, but check the list first.
More on Remotes, Collaboration and Pull Requests
You are new to a team. How do you collaborate daily without stepping on others' toes?BeginnerYou are migrating a repo from Bitbucket to GitHub and must keep every branch and tag.IntermediateYou want to contribute a fix to an open-source project you do not have write access to.BeginnerA teammate sent a 3,000-line PR and nobody can review it properly.IntermediateA reviewer asks for changes. How do you update the PR cleanly?BeginnerYour team wants stacked PRs so that large work arrives in small reviewable steps. How do you set it up?Advanced