Reverting a submodule in Git is simple. How to revert changes to a Git submodule The cleanest / easiest method of reverting changes to one or many git submodules is by using the following two commands: 1git submodule deinit -f . 2git submodule update --initThe git submodule deinit -f . command “deinitializes” all submodules in the repository. The git submodule update --init command does a new checkout of them.