Git 分支明明存在,删除时却提示错误,如何解决?
从stackoverflow
看来的
Branches are stored as files containing the SHA they point to. Try deleting the file for this branch, named localbranch, from the .git/refs/head/ directory within your project:
rm .git/refs/heads/localbranch
Note that if this branch exists on the remote server as well (though the branch name doesn't suggest so), you could use
git push origin :branchname
to do that
应该不用翻译了吧?
2 回答5.1k 阅读✓ 已解决
5 回答2.8k 阅读
3 回答2.6k 阅读
3 回答961 阅读
两种可能。
.git/packed-refs
文件,搜索一下feature-upcategory
,如果有就把那一行删除。.git/refs/HEADS
文件夹,找一下有没有这个feature-upcategory
,如果有就把这个文件删除。