有没有办法在执行 git checkout-index
时也从子模块复制文件?
我已经检查了 git checkout-index 的文档但它没有提到子模块
最佳答案
都不是checkout-index.c
, t/t2006-checkout-index-basic.sh
也不Documentation/git-checkout-index.txt
提及子模块。
这在 this issue 中得到确认/讨论(2010) 或 this one (2015-2016).
所以(如评论)git submodule foreach
仍然是最佳选择:
git submodule foreach --recursive 'git checkout-index'
关于git - 在 git checkout-index 中也包括子模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24710751/