Submodule
Add submodule:
Update submodule:
## sync the url info
git submodule sync
## update && populate files
git submodule update --init
## REALLY go inside the submodule and pull files
git submodule update --init --remote
Remove submodule:
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 the superproject.
- Delete the now untracked submodule files.
- rm -rf .git/modules/