我正在做一个托管在github上的预先存在的Laravel项目,并且我已经使用laradock设置了我的开发环境。我使用git submodule add https://github.com/LaraDock/laradock.git在我的项目根目录上克隆了laradock存储库
然而,当我切换到一个不同的git分支时,laradock文件夹就被清空了。我再次运行git submodule add https://github.com/LaraDock/laradock.git并得到以下消息
A git directory for 'laradock' is found locally with remote(s):
origin https://github.com/LaraDock/laradock.git
If you want to reuse this local git directory instead of cloning again from
https://github.com/LaraDock/laradock.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.因此,我使用--force选项运行,它返回。但是我当然不应该在每次切换分支时都这样做?
发布于 2017-02-02 18:04:30
我删除了所有内容,然后重新开始。
我认为这个问题的发生可能是因为我在.gitignore中添加了laradock/和.gitmodules。
https://stackoverflow.com/questions/41939952
复制相似问题