luk*_*sak 4 git drupal git-submodules
我正在尝试为我的drupal安装克隆一个子模块.我运行以下命令:
git submodule add http://git.drupal.org/project/token.git /sites/all/modules/token
Run Code Online (Sandbox Code Playgroud)
这会引发此错误:
The following path is ignored by one of your .gitignore files:
/sites/all/modules/token
Use -f if you really want to add it.
Run Code Online (Sandbox Code Playgroud)
但我的.gitignore文件是空的.
所以我尝试按照建议运行它:
submodule add -f http://git.drupal.org/project/token.git /sites/all/modules/token
Run Code Online (Sandbox Code Playgroud)
但是这会抛出这个错误:
fatal: could not create leading directories of '/sites/all/modules/token': Permission denied
Clone of 'http://git.drupal.org/project/token.git' into submodule path '/sites/all/modules/token' failed
Run Code Online (Sandbox Code Playgroud)
权限是777.
想法?
关心卢卡斯
刚刚找到答案:
git submodule add http://git.drupal.org/project/token.git sites/all/modules/token
Run Code Online (Sandbox Code Playgroud)
领先的"/"就是问题所在.