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
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
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'
You may want to try:
#install submodules
git submodule update --init --recursive
The recursive flag is not required but, per the man page:
If --recursive is specified, this command will recurse into the registered submodules, and update any nested submodules within.
© 2022 - 2024 — McMap. All rights reserved.
git checkout-index
is submodule-aware. Can you usegit submodule foreach
to help you though? – Burley