prune for remote "Deletes all remote tracking branches remotely in <name> . These obsolete branches are already removed from the remote repository referenced by <name> but are still locally available in" remotes/<name> ".prune for push "Delete remote branches that do not have a local instance."
The idea is to list all the remote branches ( git branch -r ), and if there is no local branch with the same name, git push origin :remoteBranchName (delete it on the remote control)
source share