"git submodule foreach" does not work on Windows

Cygwin means unix-like environment.

As you can see in other git submodule foreach examples (like "Bash: Git submodule foreach?"), all those commands are using single quotes around the foreach directive (as commented by Stefan Näwe)

This thread do mention in the example:

git submodules foreach 'git config -f $toplevel/.git/config submodule.$name.ignore all' 

Note the single quote (double quotes did not work from msysgit bash shell)


But as I mentioned in "git submodule foreach - Robust way to recursively commit a child module first?", with git 1.9.0+ (and commit 1c4fb13), you could also try without quotes:

git submodule --quiet foreach echo $name

As commented by Stefan Näwe, you would need to do a git submodule update --init --recursive first, before any foreach directive.