How to git delete client branch not in server branch
without use git delete branch by branch
How to git delete client branch not in server branch
without use git delete branch by branch
If you are talking about remote tracking branches (which could track non-existent branches on the remote side), then that would be git remote prune
:
git remote prune origin --dry-run
See:
prune
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>
".With
--dry-run
option, report what branches will be pruned, but do not actually prune them.
More details in "Delete a Git branch both locally and remotely", which also points out:
git fetch origin --prune
git fetch origin -p # Shorter