PSA: Do not put git repos inside other git repos. Git is not a package manager. You will make yourself sad. It doesn't matter how many conceptual primitives they share. Don't do it. Just use a package manager. You don't even need a package repository. You can still download things directly from git repos if you want to. Just list them in a package.json or something, and let npm do it. Or go.mod. Anything.
Please. For your own sake. And everyone who comes after you.