If you want to do this for all submodules, without having to change directories, you can perform
git submodule foreach git reset --hard
You can also use the recursive flag to apply to all submodules:
git submodule foreach --recursive git reset --hard