从子模块目录中删除所有内容(因为它们在初始子模块更新之前)

Remove everything from submodule directories (as they were before initial submodule update)

我需要测试调用 git submodule update --init 的设施。

为了使命令具有可见效果,我希望将子模块目录重置为它们在我最初调用 submodule update 之前所处的状态——即一个空白目录,但仍注册为子模块。

如果我只是 rm -rf 它们下面的所有内容,它会被解释为本地更改 -- 不是我需要的。

Removing 除非真的没有更好的方法,否则我不想求助于重新添加所有子模块。

git submodule deinit 这样做。