I have a meta project with a number of submodules in it. I would like to run the following lines inside a foreach loop of some kind.
cd $subDirectory
"\n\nModule $subDirextory" >> log
git log --pretty=format:"%h%x09%an%x09%ad%x09%s" origin/${Branch}..HEAD >> log
cd ..
The idea is to get a log from the last branch point up to HEAD for each submodule in the meta repo. How can I go about doing this?