首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >如何用另一个repo替换一个git子模块?

如何用另一个repo替换一个git子模块?
EN

Stack Overflow用户
提问于 2013-01-19 01:52:39
回答 6查看 46K关注 0票数 106

如何用不同的git代码库替换git子模块?

具体来说,我有一个子模块:

  • 位于./ExternalFrameworks/TestFramework,指向git repo git@github.com:userA/TestFramework.git
  • ,我希望它现在指向git

问题是,当我使用here描述的方法删除子模块时,然后使用以下命令重新添加它

代码语言:javascript
复制
git submodule add git@github.com:userB/TestFramework.git

我得到了这个错误:

代码语言:javascript
复制
A git directory for 'ExternalFrameworks/TestFramework' is found locally with remote(s):
  origin    git@github.com:userA/TestFramework.git
If you want to reuse this local git directory instead of cloning again from
  git@github.com:userB/TestFramework.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.
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14404704

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档