0

How to git delete client branch not in server branch

without use git delete branch by branch

Ton
  • 73
  • 2
  • 7
  • possible duplicate of [Remove local (untracked) files from my current Git branch?](http://stackoverflow.com/questions/61212/remove-local-untracked-files-from-my-current-git-branch) – Dhinakaran Thennarasu Feb 10 '15 at 05:39

1 Answers1

2

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
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250