如何刪除git submodules

Stage the .gitmodules changes:
git add .gitmodules
Delete the relevant section from .git/config.
Remove the submodule files from the working tree and index:
git rm --cached path_to_submodule (no trailing slash).
Remove the submodule’s .git directory:
rm -rf .git/modules/path_to_submodule
Commit the changes:
git commit -m "Removed submodule "
Delete the now untracked submodule files:
rm -rf path_to_submodule

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章