.gitmodules file

Once you have one or a few submodules added, you will notice a new file named .gitmodules inside your repository. This is a configuration file which holds all information about what you’ve pulled from where. The content of .gitmodules should look something like this :

[submodule "requests"]
    path = requests
    url = https://github.com/psf/requests.git

The file may contain more entries as you add more submodules.

You should keep in mind that gitmodules is version-controlled along with the rest of your repository. Anyone who clone/fork from you should be able to access your submodules as well.

Leave a Comment