Delete remote branches missing locally
DestructivePushes every local branch and deletes the remote branches that have no local counterpart, which can remove other people's work.
Destructive: this command can permanently delete data. Check every value before running it.
git push --prune origin 'refs/heads/*:refs/heads/*'Edit the highlighted values, then copy. They are inserted as typed, without shell escaping.
Report an issue (opens in a new tab) wrong command, wrong danger level, typo… (on GitHub)
Adapted from tldr-pages (common/git-push.md), licensed under CC BY 4.0.