In many dependency managers, it is a good practice not to include files downloaded by the manager into your repository, always being downloaded through the manager. If so, add the manager files / folders to .gitignore
.
If you prefer to download other repositories within yours, you can use submodules.
To add a submodule to your project use:
git submodule add https://github.com/chaconinc/DbConnector
Where the URL will be from the repository you are downloading.
When cloning a repository with submodules, they will come empty by default. To download, use:
git submodule init
git submodule update
This will update the settings and download the repository of the submodule.