I looking for the command which not available in git version 1.7.4 but I am not be able to upgrade the git client.
So, are there any command which equivalent to
git push --prune
prune
for remote "Deletes all stale remote-tracking branches under <name>
. These stale branches have already been removed from the remote repository referenced by <name>
, but are still locally available in "remotes/<name>
". "prune
for push "Remove remote branches that don’t have a local counterpart".The idea would be to list all remote branches (git branch -r
), and if there is no local branch with the same name, to git push origin :remoteBranchName
(delete it on the remote)