Skip to content

Instantly share code, notes, and snippets.

@kyleturner
Created January 5, 2012 01:07
Show Gist options
  • Save kyleturner/1563153 to your computer and use it in GitHub Desktop.
Save kyleturner/1563153 to your computer and use it in GitHub Desktop.
How to remove a submodule from a Github project
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.
@siyuhong
Copy link

siyuhong commented Nov 3, 2022

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