我想从我正在使用的裸仓库中删除一个分支,但是这个任务遇到了一些困难,因为我无法在没有“工作树”的情况下切换到主仓库,而裸仓库没有工作树。
当我运行 git branch -d master
命令时,输出结果为:
error: Cannot delete the branch 'master' which you are currently on.
我尝试通过运行git checkout develop
切换到另一个名为“develop”的分支,但输出是:
fatal: This operation must be run in a work tree