4.6. Working with Submodules#
First checkout a branch in the submodule since it typically operates in “detached HEAD” mode.
Inside a submodule folder work as if it were an ordinary repository.
To update the tracked commit for a submodule, check out the desired commit and then add the submodule’s path to a commit in the parent repository.