0
  1. git branch -a shows remotes/team/master and remotes/team/my-branch

  2. 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?

Robert Claypool
  • 4,262
  • 9
  • 50
  • 61

1 Answers1

1

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
Ikke
  • 99,403
  • 23
  • 97
  • 120