git:submodule - evanmoran/quick GitHub Wiki

Update all submodules in this repo

git submodule update --init --recursive

Add a submodule

git submodule add <repro_to_add> <name_in_your_repo>

Remove a submodule (git 1.8)

git submodule deinit -f path/to/submodule
rm -rf .git/modules/path/to/submodule
git rm -f path/to/submodule

Remove a submodule (< git 1.8)

Remove the submodule directory
Remove the record in `~/.git/config`
Remove the record in ~/.gitmodules
Remove the dir ~/.git/modules/<name>

Interesting Git aliases

[alias]
  grab = fetch -p --recurse-submodules=yes
  sup = submodule update --init --recursive
⚠️ **GitHub.com Fallback** ⚠️