How to `git clone` including submodules?

With version 1.7.1 of Git and later, you can use:

git clone --recursive git://
cd bar

For already cloned repositories, just use:

cd clonde-repository
git submodule update --init --recursive

How to add a git submodule?

To add another git repository as submodule to your main repository, just use this command:

cd repository
git submodule add git:// submodules-dir/bar