I need to test a facility that calls git submodule update --init
.
For the command to have a visible effect, I wish to reset submodule directories to the state they were in before I initially called submodule update
-- i.e. a blank directory but still registered as a submodule.
If I just rm -rf
everything under them, it's rather interpreted as a local change -- not what I need.
Removing and re-adding all the submodules is not something I wish to resort to unless there really is no better way.
git submodule deinit
does that.