Reputation: 4312
git branch -a
shows remotes/team/master
and remotes/team/my-branch
git remote rm team
says "error: Could not remove config section 'remote.team'"
(because I edited the config file with a text editor).
Since the team
remote is gone, how can I delete these (local) remote branches?
Upvotes: 0
Views: 73
Reputation: 101241
To delete remote tracking branches:
git branch -rd team/master
-r
means remote. So -rd
means to delete remote tracking branches.
To automatically remote any remote tracking branches which don't have an upstream branch anymore:
git remote prune
Upvotes: 1