How to configure submodules
This document will walk you through how to configure submodules in Sourcegraph. We use
.gitmodules files to figure out where a submodule exists in the tree. When a user clicks on the module in the UI, they will be redirected to the repo for the module.
This document assumes that you have access and permission to create/edit the
.gitmodules file for the repository.
- Make sure you have a
.gitmodulesfile created in folder level
- Setup the
.gitmodulesfile following the format shown in our example below
URL should be used instead of relative path when setting up the
.gitmodules file for GitLab repos:
[submodule "test-repo-2"] path = test-repo-2 url = https://github.com/test-repos/test-repo-2