git submodule status in a repository with one submodule. What does the output show if the submodule is checked out at the commit recorded in the main repo?git submodule statusThe output line starts with a space if the submodule is exactly at the commit recorded in the main repo. A '-' means the submodule is not initialized, '+' means the submodule is ahead or behind, and a space means clean.
git submodule sync in a repository with submodules?git submodule syncgit submodule sync updates the local configuration URLs for submodules to match the URLs defined in the .gitmodules file. It does not fetch or clone code.
.gitmodules. What is the correct sequence of commands to update your local config and fetch the submodule code?First, git submodule sync updates URLs. Then git submodule update --init --recursive fetches and checks out submodules. Checking status last confirms the state. Fetching all remotes is not required here.
git submodule update but get an error that the commit is not found. What is the most likely cause?If the submodule URL is wrong or unreachable, Git cannot fetch the commit, causing this error.
Updating and committing .gitmodules shares URL changes. Team members then sync config and update submodules to get correct commits.