Alex Rivera | Logout

git branch -d <BRANCH>: Fatal - Couldn't look up commit object for HEAD

Asked 2013-05-20T14:15:52.517
13

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:

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?

git
Edit
Report

1 Answer

3

To avoid this confusion you can use

"git push origin --delete branch_name"

this deletes remote branch not local branch.

answered 2013-05-21T18:51:43.987

Your Answer