How to implement/manage multiple projects in one Git repo?
Do you put code for each app in separate source control repositories or do they live in a single repository?
What is the usual practice?
They should be in a single repository each.
You can use submodules
for this purpose.
Submodule is a project inside project. The benefits of submodules is that it will allow you to have project within another project.
Git-Tools-Submodules
git-tip-of-week-git-submodules
takeradi
Updated on June 04, 2022Comments
-
takeradi almost 2 years
I have read the discussion between multiple projects per repo and one project per repo:
- What's the best practice for putting multiple projects in a git repository?
- https://softwareengineering.stackexchange.com/questions/161293/choosing-between-single-or-multiple-projects-in-a-git-repository
What I want to understand is how should we manage multiple projects in one Git repo?
Could anyone point me to any public repos which do this currently or provide me with the best practices (the first link above mentions about orphan branches but I wanted to see if there are other ways) or tutorials to achieve this?