- Git submodule is a way to include another repository in Git as a sub directory in one repository.
- It allows you to keep another repo(your own repo or someone else) in your repo ,track its changes and use it as a reference.
- TO add a submodule
git submodule add https://github.com/username/repo-name.git
Please note the username of the repo.
- Useful when you want to include external code in your repository , to track its changes or when you want to use it as reference point for another project.