## Tips for Working With git Submodules ### Cloning Repo with Submodules ###### Source: [Stackoverflow :: Empty Git submodule folder when repo cloned](http://stackoverflow.com/a/11358126/1828637) 1. Use the `--recursive` flag: git clone https://github.com/aikiframework/json.git --recursive However if you cannot, as Github desktop app on clone does not use this flag, then do this after clone: git submodule update --init 2. You will not be able to do a `git pull` by `cd`ing into the submodule directory. You will get `You are not currently on a branch.`. To let it know you really are on `master`, `cd` into each submodule directory and then: git checkout master ### Removing/Deleting a Submodule ###### Source: _todo_ 1. Remove the submodule entry from .git/config: git submodule deinit path/to/submodule 2. Delete the submodule directory from the superproject's `.git/modules` directory rm -rf .git/modules/path/to/submodule 3. Delete the submodule directory located at `path/to/submodule` rm -rf path/to/submodule 4. Remove the entry in `.gitmodules` file ***BY HAND***