0

Reset hard including Submodules

Patrick123 4 years ago 0

Sometimes one of the submodules or a submodule of a submodule is at another commit than the main repository is pointing at. When switching branches in the main repository the submodule, which is on the other commit, stays there (clear, because this is a working tree change).

If I want to make the whole Working Copy clean, I usually use discard or reset hard from the GUI on the main repository. However this does not work with the submodule of a submodule.

It would be great to have the command "git reset --hard --recurse-submodule" available from the GUI (e.g. with a checkbox "include submodules" or just another reset method)