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
You obviously don’t need to delete a branch that does not exist. Use git branch
to see a list of branches, if it’s not in there, then there is no branch, and you don’t need to delete it. Otherwise make sure to type the name correctly and git branch -D
should work.
Nevertheless you don’t need to care much about a broken branch that might be still around but is inaccessible. Branches in Git are in fact simple 40 bytes files, so not really something you need to worry about.