我有一个包含子模块的 git repot。
我想将这个 repo 克隆到一个 eclipse 工作区中,我已经读过这个
Working with Submodules
You can read more about what Git submodules are and how they work in this Git Community Book chapter.
Cloning Repositories with Submodules
Submodules are repositories nested inside a parent repository.
Therefore when doing a clone of a parent repository it is necessary to clone the submodule repositories so that the files/folders are available in the parent repository's working directory.Checking the Clone Submodules button from the Git Clone wizard will clone all submodule repositories after the clone of the parent repository finishes.
但是,当我完成克隆时,子模块目录是空的 并且该项目没有出现在工作区中。
如何添加子模块?
最佳答案
在eclipse中进入git explorer视角
你可以在你的项目下导入你的项目模块
project> working directory > select sub module > import project.
>> Import as general project (for new)
>> Import existing project (which will replace you current project)
如果您有 3 个模块,则需要一个一个地导入。作为现有模块或新模块
关于eclipse - 克隆一个有子模块的 git repo,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25781339/