Introduction
Sometimes you want to include one project inside another but keep them separate. Git submodules help by linking a nested repository inside a main repository, so you can work on both without mixing their files or histories.
When you want to include a shared library project inside your main project without copying its files.
When your project depends on another project that is developed separately and updated independently.
When you want to keep the history of the nested project separate but still track its version inside your main project.
When you want to clone a big project but only update parts of it selectively.
When you want to contribute to both the main project and the nested project but keep their codebases cleanly separated.