Given a git repository with hundreds of submodules that I don't need or want to initialize because it would take a long time, how would I move the submodule pointer to the latest commit of each submodule?
If all the submodules were initialized I could use something like git submodule foreach git pull.
There may be some related gotchas like needing to specify which branch of each submodule to pull. In this case git should use the branch specified in the .gitmodules file for each submodule. I would like the command to go ahead and follow the specified branch even if a submodule's history has been rewritten. I would expect to get an error if the branch specified in the .gitmodules file does not exist.
Errors should either be reported at the end of the command output or sent to a log file so that they are not overlooked.