git submodule update --remote
Above command updates the submodule to latest commit however I want to update to a specific commit (e.g. to some commit hash). How to achieve that ?
git submodules are repositories inside a repository, hence it has the same behavior as any other git repository. Hence enter the dependency root by using cd submodule and use any git command.
cd submodule
git checkout -b NEW_BRANCH_NAME COMMIT_ID
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With