How do you update a submodule to its latest version?
Go into the submodule, pull the wanted commit, then commit the changed pointer in the parent. Or run git submodule update --remote to fetch the tracked branch's latest commit for you.
Explain it simply
The parent points at one specific edition. Moving to the new edition is a two-step process: change the child, then record that change in the parent.
git submodule update --remote libs/ui-kit fetches the child's configured branch and checks out its tip. Then git status in the parent shows modified: libs/ui-kit (new commits). Commit that to share the update. Teammates run git submodule update --init after pulling to move to the same version. Merely pulling the parent does not change submodule contents.
Example
git submodule update --remote libs/ui-kit
git add libs/ui-kit
git commit -m "Bump ui-kit to latest"
git pushWhat to say in the interview
"I update the submodule with git submodule update --remote or by pulling inside it, then commit the new pointer in the parent. Teammates need git submodule update after pulling to match."