Reputation: 1437
When I use the git branch
command, it displays only one local branch: master
However, when I use the git branch -a
command, it displays the initial master
branch as well as two remote master branches:
remotes/wilhelm/master
remotes/origin/master
Why do I have two remote branches and how do I delete the extra branch without deleting my remote repo?
Upvotes: 0
Views: 525
Reputation: 1437
I ended up manually removing the branch from my .git/refs/remotes/
folder.
I wouldn't recommend any one do this unless:
Upvotes: 0
Reputation: 4554
It looks like you have two remote repositories. Of course everyone of them has a master branch, so you have two remote master branches.
You can remove remotes with
git remote remove <name>
This will not delete the repository, only your local repo will not track the remote repo any more.
Upvotes: 1