I think I Kind of understand what you're trying to achieve - you have some application/service dependencies that you need to run while working on your app. I've approached it a bit differently than having 2 git repos in 1 dir (which TBH I'm not sure how that would work).
Let me explain how I've approached this. I can't say if what I'm doing is the best approach, but it does seems to work quite well.
Firstly we've got a 'Docker.Dependencies' repo that has all the core dependencies that we use (or at least locally equivalent dependencies e.g. the IDP we run in production can't be run locally, so I just use Keycloak locally instead). The 'Docker.Dependencies' repo has a directory structure as shown below. Note: this will be a git submodule in my microservice repos:

The sub-directories have Dockerfiles wherever I need to add something to the base official image e.g. for Logstash, I need to install some plugins copy some pipeline configurations.
There's also a bunch of yml files at the root level. These are all docker-compose files, which I can chain together if required i.e.
docker-compose -f database.yml -f security.yml -f logging.yml up --build
Now over to my microservice repos; which have a directory structure as follows:

As mentioned, the 'Docker.Dependencies' sub-dir is actually a git submodule.
I've created a few helper scripts including a PowerShell module (package-scripts.psm1) and a script to (re)install the module (init.ps1) as well as some NPM scripts (package.json) that call the PowerShell commands, so that I can very easily do things like:
npm run dependencies
npm run migrations
as in database migraions
npm run services
to run microservices in docker
- etc.

^^ as you can see in the packages.json
file above the PowerShell scripts are all paramatised, so I customise as required for a particular microservice repo. Note: These helper scripts could probably be in another git submodule (which is something I actually plan on doing). Also I chose PowerShell instead if bash because some of our developers use Windows for their development environment.
Under src
is where the source code lives and this is also where I have the microservice Dockerfiles. As mentioned I can run my microservices using npm run services
or I could just run them directly from my IDE of choice. There's a bit of config required (which is all part of the microservice template) as we need everything to 'just work' for different machine setups e.g. docker desktop on Windows, docker on Linux, docker-machine; running the microservice in a docker container vs. running on host machine...
The microservice Dockerfile are built and published to our docker registry in the CI/CD pipeline.