Skip to content

Instantly share code, notes, and snippets.

@dfmcphee
Created September 14, 2014 22:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dfmcphee/8e5031e1ef7c7039a0db to your computer and use it in GitHub Desktop.
Save dfmcphee/8e5031e1ef7c7039a0db to your computer and use it in GitHub Desktop.
Add sub-module to repo
git rm --cached submodule_path # delete reference to submodule HEAD (no trailing slash)
git rm .gitmodules # if you have more than one submodules,
# you need to edit this file instead of deleting!
rm -rf submodule_path/.git # make sure you have backup!!
git add submodule_path # will add files instead of commit reference
git commit -m "remove submodule"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment