fetch all submodules (needed if submodules were added in context of a pull)
git submodule update --recursive --initpull all submodules
git pull --recurse-submodules
git submodule update --recursive --remoteretract all the local changes in all submodules
git submodule foreach --recursive git reset --hardin all submodules, delete all files that are not part of the repository
git submodule foreach --recursive git clean -fdx