I have only one submodule, so I did
git submodule foreach git checkout <SHA>
and everything were reverted successfully