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 have the same problem git branch -d was not working, And I didn't found anything in .git/packed-refs and .git/refs/heads but I got files in
.git/refs/remotes/origin
with the name of the branches that I was not able to delete locally as well as in remote.
But after deleting the files with the branch_name that I wanted to delete it was not showing in local.
To delete it on remote use
git fetch -p origin
The -p --prune option tells that before fetching, remove any remote-tracking references that no longer exist on the remote.
Then use command
git push origin :
to delete on remote.
And you are done. :)