Git submodules aren't supported in Domino Data Lab as of 5.2.0 due to problems around the update/push to the repo. They are not GIT best practice and while we can theoretically perform a proper 'git pull' on repos containing them, we would not correctly push them. Among other problems this can leave cached GIT files out of sync.
You can make use of them in a "Read-only" use-case however via workarounds listed below. The git cmd below is a general idea for a simple scenario. Your specific scenario might require additional git cli oriented commands depending on your use of .gitmodules file, or use of GIT_SSH_COMMAND, etc.
Automatically Pull Git Submodules
- Navigate to your project in Domino and select “Settings”.
- Under the Compute environment section on the right-hand side of the page, click on “Manage Environment”
- Click “Edit Definition” on the top-right corner of the page
- Scroll down to where there is a text box for “Pre Run Script” and paste the following* in that box:
for d in /repos/*/ ; do
( cd "$d" && git submodule update --init --recursive )
Manually Pull Git Submodules
- Open a workspace in Domino
- Open a new terminal from whichever IDE you are using
- Navigate to the /repos/<name-of-your-git-repository>
- Run the following* command:
git submodule update --init --recursive
For general information on working working with Git repos (setting up credentials, etc) see https://docs.dominodatalab.com/en/5.1/reference/projects/git/Git_repositories_in_Domino.html