Say I am in a bare repository (a remote), if I try to delete a branch with git branch -d <branch_name> I get the following error:
git branch -d <branch_name>
fatal: Couldn't look up commit object for HEAD
Why? Is there a reason why I should be unable to delete branches from a bare repository?
To avoid this confusion you can use
"git push origin --delete branch_name"
this deletes remote branch not local branch.