Created
January 5, 2012 01:07
-
Star
(146)
You must be signed in to star a gist -
Fork
(12)
You must be signed in to fork a gist
-
-
Save kyleturner/1563153 to your computer and use it in GitHub Desktop.
How to remove a submodule from a Github project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To remove a submodule you need to: | |
Delete the relevant line from the .gitmodules file. | |
Delete the relevant section from .git/config. | |
Run git rm --cached path_to_submodule (no trailing slash). | |
Commit and delete the now untracked submodule files. |
+1
I also found that I needed to delete the relevant file/folder under .git/modules/<mySubmodule>
.
useful!
According to the git submodule deinit
documents it should be a simple matter of:
git rm path/to/submodule
Seemed to work for me?
"If you really want to remove a submodule from the repository and commit that use git-rm[1] instead. See gitsubmodules[7] for removal options." - https://git-scm.com/docs/git-submodule#git-submodule-deinit-f--force--all--ltpathgt82308203
nice +1
@jfmercer only 2nd on Bing's index because bing sucks
@afiskon +1
+1
git rm -- .gitmodules [ModulesName]
eg.
git rm -- .gitmodules QtSsh
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
+1