Mono-repo or multi-repo? Why choose one, when you can have both?

  1. I hire contractors frequently, and giving them access to ALL of the source code doesn’t make sense, and isn’t secure. Having multiple repositories makes it easy to give access to subsets of repositories on a “need to code” basis.
  2. I set up Continuous Deployment for my projects. It’s much easier to let each repository have it’s own process for being deployed. When using a mono-repo, there needs to be additional logic for sorting through the directories that make up the different projects within the mono-repo.
meta git checkout -b feature/my-new-branch
meta git commit -m 'made the feature'

Making a `meta` repository

npm i -g meta
mkdir yourProject && cd yourProject
meta init
{
"projects": {}
}
git init
git add -A
git commit -m “init meta repo”
git remote add origin git@github.com:you/yourProject.git
git push -u origin master

Adding projects to your meta repo

meta project add userService git@github.com:you/userService.gitmeta project add graphqlService git@github.com:you/graphqlService.gitmeta project add appService git@github.com:you/appService.git
// .meta
{
"projects": {
"userService": "git@github.com:you/userService.git",
"graphqlService": "git@github.com:you/graphqlService.git",
"appService": "git@github.com:you/appService.git"
}
}
// .gitignore
userService
graphqlService
appService

Sharing

meta git clone git@github.com:you/yourProject.git
meta git update

Conclusion

Interested in hearing MY DevOps Journey, WITHOUT useless AWS Certifications? Read it now on HackerNoon!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Patrick Lee Scott

Patrick Lee Scott

I make things for the internet, that scale, look nice, and make money!