Sometimes we have to include other Git repositories which are thrid-party repositories into our own Git repository. Git sumodules allow us to get it and track changes in several repositories via a centeral one. The extra repositories could be located anypwhere in a parent Git repository’s workspace and are configured through .gitsubmodules file located at the root of the parent repository.
Creating a submodule
Add a submodule
Clone a repository into the Local Folder as a submodule and initialize the submodule.
After executing the above commands, the .gitsubmodules file that records the inforamtion about sub-repositories will created in the root of the parent repository.
Checkout the status of submodules
Use git submodule command to checkout the status of submoules, if - exists before the hash, it means this submodule is not initialized yet.