List the details in .gitmodules file

$  git config --file=.gitmodules -l

This command lists all the submodules present in the current repository with their paths, URL location and the branch which it is mapped in the repository.

Output will be like:


Edit the Submodule URL

This command will edit the URL of the submodule and will place it with the specified new URL repository.

$  git config --file=.gitmodules submodule.Submod.url

Edit the Submodule Branch

$  git config --file=.gitmodules submodule.Submod.branch development

This command will edit the Branch docker of the submodule and will place it in the specifified Branch development.

Sync and update the Submodule

$  git submodule sync
$  git submodule update --init --recursive --remote

These commands will sync and update the submodule to the newly specified branch or URL successfully.