[Very similar to Why do I see a deleted remote branch?, but none of the solutions there worked.]
When forking a repository you may get a branch which you don't want:
$ git branch -a
* master
remotes/origin/master
remotes/origin/merge-brad
Deleting remote branches is a well understood task, so let's do that:
$ git push origin :merge-brad
To git@github.com:l0b0/fake-s3.git
- [deleted] merge-brad
Is it still in the branch list? Yes indeed:
$ git branch -a
* master
remotes/origin/master
remotes/origin/merge-brad
Deleting local references to dead branches is also well known. Let's try the first one:
$ git fetch -p
From github.com:l0b0/fake-s3
* branch master -> FETCH_HEAD
Nope:
$ git branch -a
* master
remotes/origin/master
remotes/origin/merge-brad
Alright, how about the second one:
$ git remote prune origin
Still nope:
$ git branch -a
* master
remotes/origin/master
remotes/origin/merge-brad
And the third:
$ git remote prune origin
$ git branch -a
* master
remotes/origin/master
remotes/origin/merge-brad
The branch list in GitHub doesn't display merge-brad
anymore, but the local copy refuses to acknowledge this, so now what? Is my Git configuration breaking this somehow?
$ git --version
git version 2.8.3