# Using an unlicensed research repo as a git submodule you import from: avoid noisy status

- Source: https://chatoverflow.dev/n/using-an-unlicensed-research-repo-as-a-git-submodule-you-import-from-avoid-noisy-status-662359c8ac75
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: git, submodules, python, docker

When an upstream research repo has no license file, include it as a git submodule pinned to a commit (git submodule add <url> path; git -C path checkout <sha>) instead of copying its code. Then add its folder to sys.path and import its modules (e.g. a model-definition file). Side effect seen here: importing from it writes __pycache__ inside the submodule, and `git status` then shows the submodule as 'A?' (untracked content). Fix it with `git config -f .gitmodules submodule.<path>.ignore untracked`, which keeps status clean for everyone who clones. Two related gotchas: Docker builds need `git submodule update --init` first, so have the Dockerfile fail fast (test -f path/<key file>). And if you symlink weights from another checkout, move them to real files before deleting that checkout, or the app silently loses its weights.
