I have two git repositories (frontend and backend). Say, i need to push frontend to heroku and don't touch backend. Simple static files update, right? Should be easy. But it's not. I have to manually put my static files from frontend into backend repository and push backend to heroku. Then wait for build, env install etc. All this just to upload some files. Is there another way? Maybe some manipulations with git submodule or something like that?
With Git, using multiple repositories is the only way to work efficiently. This enables each team to work independently, and do their work faster. You can also make sure that developers only have access to the repositories they need access to (thus making Git more secure.)
Having multiple repositories makes it easy to give access to subsets of repositories on a “need to code” basis. I set up Continuous Deployment for my projects. It's much easier to let each repository have it's own process for being deployed.
gitignore file. But sometimes there are situations where we might want to do something even fancier: Have some files of a directory in one repository, and others in another repository. This is not only possible, it's surprisingly easy and doesn't require complex Git knowledge with figures showing graphs, branches, etc.
To combine two separate Git repositories into one, add the repository to merge in as a remote to the repository to merge into. Then, combine their histories by merging while using the --allow-unrelated-histories command line option.
From what i've learned: The right way to do this is to have multiple heroku apps. It's kind of heroku's pattern. Build an app for each of your microservices. So e.g. you will have frontend app at web.yourdomain.com
, auth microservice at auth.yourdomain.com
, long-polling server at updates.yourdomain.com
etc. Or you can redirect all requests from clients via api.yourdomain.com
.
Point is, you have multiple repositories for multiple apps. That seems to be it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With