使用上一个子模块后添加git子模块

时间:2015-01-03 22:02:22

标签: git git-submodules

我有几个导致我出现问题的git子模块(参考Verify changes in git modules

我按照http://davidwalsh.name/git-remove-submodule删除了子模块。

然后我尝试添加子模块,但是,如下所示,我没有得到预期的结果(实际上,他们可能是预期的,只是不适合我)。

我尝试了--force选项,但只是恢复到我之前的子模块,这不是我想要的。当我的应用程序使用此路径时,我也不希望更改子模块的目录。

如何在这种情况下添加子模块?

[Michael@devserver main]$ pwd
/var/www/main
[Michael@devserver main]$ git status
On branch master
Your branch is ahead of 'origin/master' by 11 commits.
  (use "git push" to publish your local commits)
nothing to commit, working directory clean
[Michael@devserver main]$ git submodule add https://github.com/parsecsv/parsecsv-for-php.git application/classes_3rd/parsecsv
A git directory for 'application/classes_3rd/parsecsv' is found locally with remote(s):
  origin        https://github.com/parsecsv/parsecsv-for-php.git
If you want to reuse this local git directory instead of cloning again from
  https://github.com/parsecsv/parsecsv-for-php.git
use the '--force' option. If the local git directory is not the correct repo
or you are unsure what this means choose another name with the '--name' option.
[Michael@devserver main]$

0 个答案:

没有答案