The simplest solution is:
git clone --recursive [email protected]:name/repo.git
Then cd in the repo directory and:
git submodule update --init
git submodule foreach -q --recursive 'git checkout $(git config -f $toplevel/.gitmodules submodule.$name.branch || echo master)'
git config --global status.submoduleSummary true
Additional reading: Git submodules best practices.