【Github】在repo中添加其它repo: adding embedded git repository
Github在repo中添加其它repo: adding embedded git repository
最近整理github资源 发现没法将另外github repo上传过去,后来发现使用git submodule可以添加
核心命令git submodule add <url> index
git submodule add https://github.com/DengSchoo/OnJava8-zh LanguageFoundation/Java8/OnJava8-resource/OnJava8-zh
如果发现该索引已经存在:
fatal: 'LanguageFoundation/Java8/OnJava8-resource/OnJava8-zh' already exists in the index
则需要删除缓存:
git rm -r --cached LanguageFoundation/Java8/OnJava8-resource/OnJava8-zh