Problem description:
git branch shows that the local branch has the branch I want to delete
git checkout -b [filename] shows that the branch does not exist (not found)
git checkout [filename] shows failed to lock ref for update: no such file or directory
Please tell me how to solve this problem
为情所困2017-05-02 09:36:58
The error message is obvious. There is no such directory. Are you sure this branch exists?
给我你的怀抱2017-05-02 09:36:58
Make sure you delete the corresponding branch. git branch
查看分支是否存在,注意远程分支一定要有:
#删除远程分支
git push origin :dev
#删除本地分支
git branch -D dev
为情所困2017-05-02 09:36:58
Not particularly understandable. . . Why do I need git checkout -b to delete a branch? If you want to delete a branch, shouldn't you first switch to another branch and then git branch -d?
迷茫2017-05-02 09:36:58
-b means build, which means new.
-d means delete. This is the deletion you want.