Delete broken branch in git

前端 未结 6 1790
旧时难觅i
旧时难觅i 2020-12-24 12:44

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

6条回答
  •  情歌与酒
    2020-12-24 13:31

    I used git update-ref -d refs/heads/ to fix this issue. Presumably, this does the same thing as what Rup suggests in the selected answer except it's interfaced via Git's CLI.

提交回复
热议问题