Date
Jun. 22nd, 2024
 
2024年 5月 17日

Post: How to effectively delete a git submodule

Today is the A Memorial Day

How to effectively delete a git submodule

Published 02:05 May 17, 2024.

Created by @ezra. Categorized in #Version Control, and tagged as #Git.

Source format: Markdown

Table of Content

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes: git add .gitmodules.
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule <name>".
  • Delete the now untracked submodule files: rm -rf path_to_submodule.
Pinned Message
HOTODOGO
I'm looking for a SOFTWARE PROJECT DIRECTOR / SOFTWARE R&D DIRECTOR position in a fresh and dynamic company. I would like to gain the right experience and extend my skills while working in great teams and big projects.
Feel free to contact me.
For more information, please view online résumé or download PDF
本人正在寻求任职 软件项目经理 / 软件技术经理 岗位的机会, 希望加⼊某个新鲜⽽充满活⼒的公司。
如有意向请随时 与我联系
更多信息请 查阅在线简历下载 PDF