不灭的焱

革命尚未成功,同志仍须努力下载JDK17

作者:Albert.Wen  添加时间:2022-03-13 19:45:23  修改时间:2024-04-22 23:12:03  分类:电脑/软件使用  编辑

今天 把几个Java项目,用IDEA开发工具,以module的形式拷贝合并到一个项目下,结果在 gogs 项目页面报错:

An error has occurred : get submodule "spider_shipping_schedule": revision does not exist
Application Version: 0.12.3

1. 删除submodule缓存

需要先暂存 .gitmodules 文件, 否则会报错: fatal: please stage your changes to .gitmodules or stash them to proceed

git add .gitmodules
git rm --cached submodule_name

2. 删除submodule目录

rm -rf submodule_name

3. 修改.gitmodules

移除对应的submodule信息,只有1个submodule信息也可以删除该文件。

4. .git/modules

移除对应的submodule目录

5. .git/config

移除对应的submodule信息

 

 

摘自:https://segmentfault.com/a/1190000040338658