1

例如,我有 Magento 项目:

app/design/frontend/base/
app/design/frontend/default/
errors/default/
errors/local.xml.sample
...
skin/frontend/base/
skin/frontend/default/
...

...和它的外部主题:

app/design/frontend/[theme name]/default/
errors/[theme name]/
errors/local.xml.[theme name]
skin/frontend/[theme name]/default/
README.[theme name]

但是当我尝试将主题的存储库作为子模块添加到项目的根目录时......

$ git submodule add -b theme_name git://theme_repository.git .
'' already exists in the index

有什么解决办法吗?

4

1 回答 1

2

您不能在当前目录中添加子模块的内容(已经版本化,因此“已经存在于索引中”)。
您将需要使用:

git submodule add -b theme_name git://theme_repository.git aDirectory

aDirectory将是一个尚不存在的新目录,并创建为子模块的根文件夹。

然后,您可以将符号链接添加到该新文件夹,以便访问app/design/frontend/[theme name]skin/frontend/[theme name]引用正确的文件夹。

于 2012-11-15T08:13:45.590 回答