What are the difference? submodule update vs submodule update --remote

I have cloned a repo that contains submodules. 

But i’m not sure to use which git command,

git submodule update vs git  submodule update –remote

You can find the documentation for all of git at https://git-scm.com.

Apparently, git submodule update --remote allows you to use the state of the submodule’s remote-tracking branch instead of the SHA that is recorded in the supermodule’s configuration for the given submodule. This would allow you to update to a version of the submodule that is different from the one configured so you could test a new change to see if it is compatible with the supermodule’s code, for example.

I hope that helps!