【发布时间】:2012-03-04 23:44:53
【问题描述】:
当我尝试更改分支时出现此错误。
可能我会在
处提供一些命令信息/path/to/git/repo/.
根据命令:
git branch
我得到以下输出
* V1.5
V2.0
master
当我尝试命令时
git checkout V2.0
我得到以下输出:
fatal: This operation must be run in a work tree
配置文件内容:
cat config
[core]
repositoryformatversion = 0
filemode = true
bare = true
[remote "origin"]
url = /path/to/git/repo/.git
【问题讨论】:
-
看来你有一个裸仓库。裸仓库没有工作树,所以
git checkout对它们没有意义。
标签: git command-line