Voici comment configurer un sous module pour qu’il reste sur la branche master en deux étapes
git config -f .gitmodules submodule.<dossier_du_module>.branch master
git submodule update --remote --recursive
Note that the submodule still won’t be on any branch. Simply their SHA1 would be the one of origin/master. You would still need to checkout master for each of them.
git submodule foreach --recursive git checkout master
Source : https://stackoverflow.com/questions/9189575/git-submodule-tracking-latest/9189815#9189815