git remote prune origin

Category: Git - Core

git remote prune origin

Delete stale remote-tracking branches

Removes local refs like origin/dead-branch whose remote counterparts no longer exist. It is the manual form of git fetch --prune. Run it when git branch -r shows branches you know were deleted upstream.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.