Plone技术资料

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 1791|回复: 0

git remove submodule

[复制链接]
发表于 2019-8-1 10:01:34 | 显示全部楼层 |阅读模式
最保险删除submodule的方法转自Stack Overflow)
Via the page Git Submodule Tutorial:To remove a submodule you need to:

  1.     Delete the relevant section from the .gitmodules file.
  2.     Stage the .gitmodules changes:
  3.     git add .gitmodules
  4.     Delete the relevant section from .git/config.
  5.     Remove the submodule files from the index:
  6.     git rm --cached path_to_submodule (no trailing slash).
  7.     Remove the submodule's .git directory:
  8.     rm -rf .git/modules/path_to_submodule
  9.     Commit the changes:
  10.     git commit -m "Removed submodule <name>"
  11.     Delete the now untracked submodule files:
  12.     rm -rf path_to_submodule
复制代码



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|Archiver|手机版|Plone技术资料 ( 湘ICP备14006519号-1 )

GMT+8, 2019-10-22 11:22 , Processed in 0.043737 second(s), 14 queries , Gzip On.

Powered by Plone! X3.4

© 2001-2019 Plone.org.

快速回复 返回顶部 返回列表