git submodule删除后重新添加问题
来源:互联网 发布:java string 倒序 编辑:程序博客网 时间:2024/05/23 16:56
重新添加git 子模块出现的问题:
A git directory for 'formRenderLib' is found locally with remote(s): origin git@gitlab.com:newcare/formRenderLib.gitIf you want to reuse this local git directory instead of cloning again from git@gitlab.com:newcare/formRenderLib.gituse the '--force' option. If the local git directory is not the correct repoor you are unsure what this means choose another name with the '--name' option.
说明没有删除干净之前的module
解决方法:
在主项目目录下打开命令行工具执行命令
git rm --cached path_to_submodule
删除指定模块的文件打开主项目目录下 .gitmodules (可能会隐藏,需要显示设置)文件 删除如下类似内容:
mac下使用命令vim .gitmodules
可打开vim编辑[submodule "path_to_submodule"] path = path_to_submodule url = https://github.com/path_to_submodule
打开主项目目录下 .git/config 文件 删除如下内容:
同样可使用vim编辑[submodule "path_to_submodule"] url = https://github.com/path_to_submodule
使用命令行工具执行命令:
rm -rf .git/modules/path_to_submodule
删除.git下的缓存模块
最后使用如下命令即可添加子模块 git submodule add https://github.com/path_to_submodule
参考
Git Submodule管理子模块
vim编辑器使用
阅读全文
0 0
- git submodule删除后重新添加问题
- git删除submodule
- Git submodule 如何删除一个 submodule
- Git submodule 如何删除一个 submodule
- SVN删除后,重新添加,不能更新的问题
- git submodule 删除及更新URL
- 使用git submodule添加MAVLink源文件
- Git submodule添加子项目/库
- git解决无法正常添加个别submodule
- 解决在eclipse中删除tomcat server后导致无法重新添加服务器的问题
- QLayout删除控件后重新布局问题
- Git Submodule
- git submodule
- git submodule
- Git submodule
- git submodule
- [git] submodule
- git submodule
- C++中关键字explicit
- javascript模板引擎template.render使用
- KEIL工程目标选项配置
- Zookeeper集群模式安装
- 在Windows批处理文件中引用日期和时间的方法
- git submodule删除后重新添加问题
- hibernate新增一条带有外键的数据记录的时候,一定要先将外键对应的对象持久化
- Android zip STORE方式存储文件和文件夹
- 禁止网页缓存
- vue2.0 循环
- 51Nod 1065 最小正子段和 前缀和
- java设置Cookie后其他请求拿不到或者下次会话拿不到request.getCookie拿不到
- Angular2 如何在现有日期上加X分钟
- Javaweb 项目启动数据初始化