Back to all tips

Git Pro Tips

Prune Remote Tracking Branches

🗓️ Published: 4/15/2026 Originally on X: 5/26/2022
Prune Remote Tracking Branches

Even after a branch is deleted from the remote repository, a stale remote-tracking copy can remain locally.

To inspect remote branches:

git branch -r

To remove stale ones:

git remote prune origin

Discuss this tip on