I have created branch with \"git checkout -b mybranch\". It seems that something went wrong, and now I can\'t delete it using \"git branch -D mybranch\". It says: error: bra
I had the same problem. The branch was on the list of branches whenever I executed the git branch command, but I couldn't delete it.
The solution in my case was simple and a bit unexpected: I checked out the broken branch git checkout broken_branch (yes, it worked), then I checked out back to master and... again executed git branch -D broken_branch.