I often use Git Submodules in my repositories, it’s a handy way to have external source code in your repo, without having to worry much about the external updates and source management (you can just checkout, pull etc as every normal git repo).
Often the external sources are hosted in public GitHub repos, without any need to authenticate.
You create .gitmodules file look like:
[submodule "DbConnector"] path = DbConnector url = https://github.com/chaconinc/DbConnector
And with a few more command you are ready to go.
Lastly I wanted to use submodules between my private Azure DevOps repositories in the same Azure DevOps Project.
So I added the submodule with its full path, like: