Include submodules as well in git checkout-index

git, git-submodules

Solution

Neither `checkout-index.c`, `t/t2006-checkout-index-basic.sh` nor `Documentation/git-checkout-index.txt` mention submodules. That was confirmed/discussed in this issue (2010) or this one (2015-2016).

So (as commented) `git submodule foreach` remains the best option:

 git submodule foreach --recursive 'git checkout-index'

Problem

Is there a way to copy files from the submodules as well when doing `git checkout-index`? I already checked the documentation of git checkout-index but it makes no mention of submodules

Original source