Git command equal to Git push --prune

I am looking for a command that is not available in git version 1.7.4, but I cannot update the git client.

So is there any command that is equivalent

git push --prune 
+4
source share
1 answer
  • 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)

0
source

Source: https://habr.com/ru/post/1441779/


All Articles