├── CONTRIBUTING.md ├── README.md └── README-zh-CN.md /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contribution guidelines 2 | 3 | * Practice common sense and observe applicable [Awesome List Guidelines](https://github.com/sindresorhus/awesome/blob/main/contributing.md). 4 | * Proof-read yourself. 5 | * Please be nice. 6 | * Be brave with contributing and commenting. 7 | * Consider if the item you're adding to the list is actually pretty useful and/or exciting to people interested in, actively using, or considering a migration to a monorepo. 8 | * In case we gather a lot of links that are kinda-useful, but not exactly awesome, we could create another list within the repo. 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Awesome Monorepo [![Awesome](https://awesome.re/badge.svg)](https://awesome.re) 2 | 3 | A curated list of awesome Monorepo tools, software and 4 | architectures. Monorepos, short for mono-repositories, are 5 | repositories that contain multiple projects, usually related to each 6 | other. 7 | 8 | Inspired by [vinta/awesome-python](https://github.com/vinta/awesome-python). 9 | 10 | English | [简体中文](./README-zh-CN.md) 11 | 12 | ## Contents 13 | 14 | * [Build systems & dependency management tools](#build-systems--dependency-management-tools) 15 | * [Repository management tools](#repository-management-tools) 16 | * [Good reads](#good-reads) 17 | * [Version control systems & add-ons](#version-control-systems--add-ons) 18 | * [Git](#git) 19 | * [Mercurial](#mercurial) 20 | * [Development process tools](#development-process-tools) 21 | * [Notable public monorepos](#notable-public-monorepos) 22 | * [Migration tools](#migration-tools) 23 | 24 | ## Build systems & dependency management tools 25 | 26 | * [baur](https://github.com/simplesurance/baur) builds only changed applications in a monorepo branch and manages build artifacts 27 | * [Bazel](https://bazel.build) is Google's monorepo-oriented build system. More on Bazel: [awesome-bazel](https://github.com/jin/awesome-bazel) 28 | * [Bit](https://github.com/teambit/bit) is a tool for building and managing JavaScript projects with multiple components, and managing the dependency graph of components. 29 | * [Bolt Pkg](https://github.com/boltpkg/bolt) is a super-powered JavaScript project management. 30 | * [Buck](https://buckbuild.com/) is Facebook's monorepo-oriented build system. 31 | * [drkns](https://github.com/frantzmiccoli/drkns) is a simple and language agnostic monorepo build tool. 32 | * [Garment](https://github.com/Farfetch/garment) is Farfetch's monorepo build system with centralized and customizable task management. 33 | * [GitLab CI](https://gitlab.com/gitlab-org/gitlab-ce/issues/19232) 11.4 supports running steps based on path changes. 34 | * [Lerna](https://lerna.js.org/) is a tool for managing JavaScript projects with multiple packages, built on Yarn. 35 | * [MBT](https://github.com/mbtproject/mbt) is a build tool with differential build support. 36 | * [Nix](https://github.com/NixOS/nix) is a package and distribution build tool with remote caching, predominately used by NixOS. 37 | * [Nx](https://nx.dev/) is a build system for TypeScript monorepos and a set of monorepo management tools. 38 | * [OAO](https://github.com/guigrpa/oao) is a Yarn-based, opinionated JavaScript monorepo management tool. 39 | * [Pants](http://www.pantsbuild.org/) is a monorepo-oriented build system, used by Twitter, Foursquare and multiple other companies. 40 | * [Please](https://please.build/index.html) a cross-language build system with an emphasis on high performance, extensibility and reproduceability. 41 | * [pnpm](https://pnpm.js.org/en/) is a JavaScript dependency management tool that supports monorepos through a set of dedicated commands called `pnpm multi`. 42 | * [Rush Stack](https://rushstack.io/) is a family of tools geared towards large scale TypeScript monorepos, and based around the [Rush](https://rushjs.io/) build orchestrator 43 | * [Spago](https://github.com/spacchetti/spago) is a PureScript package manager and build tool powered by Dhall and package-sets. 44 | * [Symplify/MonorepoBuilder](https://github.com/Symplify/MonorepoBuilder) is a PHP monorepo management tool. 45 | * [Tainted](https://github.com/kynrai/tainted) is a tool to determine which Go packages need to be rebuilt in a monorepo. 46 | * [Versio](https://github.com/chaaz/versio) updates all version numbers in monorepo projects based on [conventional commits](https://www.conventionalcommits.org/), and can generate changelogs and tags. 47 | * [Yarn](https://yarnpkg.com/blog/2017/08/02/introducing-workspaces/) is a JavaScript dependency management tool that supports monorepos through workspaces. 48 | * [Layer-pack](https://github.com/layer-pack/layer-pack) is a Webpack plugin allowing monorepo structures via inheritable npm packages/code layers & es6 glob imports. 49 | * [Turborepo](https://turborepo.org/) is a high-performance build system for JavaScript and TypeScript codebases. 50 | 51 | ## Repository management tools 52 | 53 | * [Builder](https://github.com/FormidableLabs/builder) is a tool that makes it possible to ship the same scripts across projects in a Node.js monorepo. For example, share build and testing scripts across projects. 54 | * [FBShipIt](https://github.com/facebook/fbshipit) is a library written in Hack for copying commits from one repository to another. 55 | * [adeira/shipit](https://github.com/adeira/shipit) is a simplified JavaScript port of FBShipIt. 56 | * [Lank](https://github.com/FormidableLabs/lank) is a tool that links packages together in a Node.js monorepo using automatic configuration of `NODE_PATH` instead of symlinks. Lank also allows you to run the same commands across all (or subsets of all) packages. 57 | * [monorepo-run](https://github.com/Akryum/monorepo-run) is a collection of helpers to run scripts in each package of a yarn monorepo with a separated pane per package. 58 | * [oao](https://github.com/guigrpa/oao) 59 | * [Syncpack](https://github.com/JamieMason/syncpack) ensures consistent dependency versions in large JavaScript Monorepos. 60 | * [Ultra Runner](https://github.com/folke/ultra-runner) is a smart script runner and build tool for Lerna, Pnpm, Rush and Yarn. Scripts run concurrently, using the dependency topology. Builds keep track of file changes and are skipped when possible. 61 | * [wsrun](https://github.com/whoeverest/wsrun) allows running a command in each package of a Yarn workspaces monorepo. 62 | * [meta](https://github.com/mateodelnorte/meta) is a tool for managing multi-project systems and libraries. It answers the conundrum of choosing between a mono repo or many repos by saying "both", with a meta repo. 63 | 64 | ## Good reads 65 | 66 | * [Why Google Stores Billions of Lines of Code in a Single Repository](https://research.google.com/pubs/pub45424.html) 67 | * [Advantages and Disadvantages of a Monolithic Repository: A case study at Google](https://people.engr.ncsu.edu/ermurph3/papers/seip18.pdf) 68 | * [Why you should use a single repository for all your company’s projects](https://www.drmaciver.com/2016/10/why-you-should-use-a-single-repository-for-all-your-companys-projects/) 69 | * [Advantages of monorepos](https://danluu.com/monorepo/) 70 | * [Monorepos make inner-source come to life](https://kevingoslar.medium.com/monorepos-make-inner-source-come-to-life-bd1592b0cadf) 71 | * [What is a monorepo? (and Should You Use Them?)](https://semaphoreci.com/blog/what-is-monorepo). 72 | * [Continuous Integration for Monorepos](https://semaphoreci.com/blog/continuous-integration-monorepos) for Semaphore-CI users. 73 | * [monorepo.tools](https://monorepo.tools) - Monorepos explained 74 | 75 | ## Version control systems & add-ons 76 | 77 | ### Git 78 | 79 | #### Tools 80 | 81 | * [Git shallow clones](https://git-scm.com/docs/git-clone) let you clone only part of your Git history. 82 | * [How to Use Git Shallow Clone to Improve Performance](https://www.perforce.com/blog/git-beyond-basics-using-shallow-clones) 83 | * [How to handle big repositories with Git](https://www.atlassian.com/blog/git/handle-big-repositories-git) 84 | * [Git clones vs Shallow Git clones](https://blogs.gnome.org/simos/2009/04/18/git-clones-vs-shallow-git-clones/) 85 | * [Git filter-branch](https://git-scm.com/docs/git-filter-branch) let you rewrite a repository's history and prune branches. 86 | * [How to handle big repositories with Git](https://www.atlassian.com/blog/git/handle-big-repositories-git) 87 | * [Git clone --single-branch](https://git-scm.com/docs/git-clone) 88 | * [How to handle big repositories with Git](https://www.atlassian.com/blog/git/handle-big-repositories-git) 89 | * [Git sparse-checkout](https://git-scm.com/docs/git-read-tree/) 90 | * [Cloning specific folders from git](https://lakehanne.github.io/git-sparse-checkout) 91 | * [How to handle big repositories with Git](https://www.atlassian.com/blog/git/handle-big-repositories-git) 92 | * [Git LFS](https://git-lfs.github.com/) improves the handling of large files in Git. 93 | * [GVFS](https://github.com/Microsoft/GVFS) virtualizes the file system beneath your git repo so that git and all tools see what appears to be a normal repo, but GVFS only downloads objects as they are needed. Windows only. 94 | * [SlothFS](https://gerrit.googlesource.com/gitfs/+/HEAD/docs/manual.md) is similar to GVFS, but read-only. It works on Linux and macOS. 95 | * [git subtree](https://github.com/apenwarr/git-subtree) merges and splits subtrees from your project into subprojects and back. Part of Git since version 1.7. 96 | * [git subsplit](https://github.com/dflydev/git-subsplit) automates and simplifies the process of managing one-way read-only subtree splits. 97 | * [splitsh-lite](https://github.com/splitsh/lite) is a very fast git subtree alternative to splits subtrees from your project into subprojects. 98 | * [josh](https://github.com/esrlabs/josh) is a git server proxy enabling on-the-fly virtualization of repositories. 99 | * [go-diff](https://github.com/dstreamcloud/go-diff) is a handy tool analyzes which packages needed to be rebuilt due to changes. 100 | * [mgt](https://github.com/nikita-skobov/monorepo-git-tools) is a tool that enables easy bidirectional sync between multiple repositories via files that define how to remap a repository 101 | 102 | #### Scaling info 103 | 104 | * Atlassian's [Monorepos in Git](https://developer.atlassian.com/blog/2015/10/monorepos-in-git/) and [How to handle big repositories in Git](https://www.atlassian.com/blog/git/handle-big-repositories-git) cover scaling options for Git. 105 | 106 | ### Mercurial 107 | 108 | #### Tools 109 | 110 | * [Watchman](https://github.com/facebook/watchman), replaced by [fsmonitor](https://www.mercurial-scm.org/wiki/FsMonitorExtension) trigger partial, incremental builds when your files change 111 | 112 | #### Scaling info 113 | 114 | * [Scaling Mercurial at Facebook](https://code.facebook.com/posts/218678814984400/scaling-mercurial-at-facebook/) 115 | 116 | ## Development process tools 117 | 118 | ### Code reviews 119 | 120 | * [Pull Review](https://github.com/imsky/pull-review/) Hubot plugin to automate pull reviews with lots of configuration options. 121 | * [Rietveld](https://github.com/rietveld-codereview/rietveld) is a code review tool by Google used by Chromium. 122 | * [API Extractor](https://api-extractor.com/) is used to detect and review API signatures for TypeScript libraries, and also for publishing a multi-package API reference. 123 | 124 | ### CI tools 125 | 126 | * [Incremental CI in Jenkins with Bazel](https://www.kchodorow.com/blog/2015/10/15/one-weird-trick-for-fast-ci/), article by Kristina Chodorow (Bazel team). 127 | * [bazel-travis](https://github.com/korfuri/bazel-travis) is a minimal setup to use Travis CI in a Bazel monorepo. 128 | * [buildpipe](https://github.com/jwplayer/buildpipe) is a tool to dynamically generate Buildkite pipelines by looking at changes in projects. 129 | * [Codefresh](https://codefresh.io/) is a CI/CD platform for Docker/Kubernetes that has native [Monorepo support](https://codefresh.io/continuous-integration/using-codefresh-with-mono-repos/) 130 | * [CI/CD for Microservices Using Monorepos](https://web.archive.org/web/20201109012429/http://blog.shippable.com/ci/cd-of-microservices-using-mono-repos), a post describing a Shippable.com build designed for triggering builds specific to the microservice that has actually been modified and ones depending on it. 131 | * [Semaphore CI](https://semaphoreci.com) is a CI/CD platform with native [monorepo support](https://docs.semaphoreci.com/essentials/building-monorepo-projects/). 132 | 133 | ### Code ownership 134 | 135 | * [GitHub's CODEOWNERS](https://help.github.com/articles/about-codeowners/) can restrict who can approve a pull request that affects a given part of a monorepo. 136 | * [Chromium's OWNERS file](https://chromium.googlesource.com/chromium/src/+/master/docs/code_reviews.md#OWNERS-files) inspired GitHub's CODEOWNERS. 137 | * [Write Guard](https://github.com/geritol/write-guard) uses GitHub actions to enforce file-level write access to a monorepo. 138 | * [CODEOWNERS generator](https://github.com/gagoar/codeowners-generator) generates a CODEOWNERS file for your monorepo from files in subfolders. 139 | 140 | ## Notable public monorepos 141 | 142 | * [Foursquare's opensource projects](https://github.com/foursquare/fsqio) 143 | * [Stellar's Go monorepo](https://github.com/stellar/go) 144 | * [Habitat's monorepo](https://github.com/habitat-sh/habitat) 145 | * [startup-os monorepo: working examples for Google's Open Source tools (bazel, etc) in a monorepo](https://github.com/google/startup-os) 146 | * [M3 monorepo - Distributed TSDB, Aggregator and Query Engine, Prometheus Sidecar, Metrics Platform](https://github.com/m3db/m3) 147 | * [Entria's Full Stack Playground Monorepo](https://github.com/entria/entria-fullstack) 148 | * [Berty's monorepo - React-native mobile App + Golang backend + Gomobile bridge + iOS & Android native drivers + Protobuf](https://github.com/berty/berty/) 149 | * [NixOS's monorepo of packages and modules can be used to incrementally build and deploy Linux machines](https://github.com/NixOS/nixpkgs/) 150 | * [Celo's monorepo (includes blockchain, misc tooling, libraries, ops stuff like terraform modules, docs, etc)](https://github.com/celo-org/celo-monorepo) 151 | * [ProtonMail's monorepo (the proton web clients: mail, calendar...)](https://github.com/ProtonMail/WebClients) 152 | 153 | ## Migration tools 154 | 155 | * [Bazel's migration-tooling](https://github.com/bazelbuild/migration-tooling) repository. 156 | * [Gazelle](https://github.com/bazelbuild/rules_go#generating-build-files) generates Bazel BUILD files automatically for Go packages. 157 | * [tomono](https://github.com/unravelin/tomono) imports an existing set of Git repositories into a monorepo. 158 | * [shopsys/monorepo-tools](https://github.com/shopsys/monorepo-tools) contains a set of tools for building and splitting a monolithic repository. 159 | * [Fastlane monorepo migration tools](https://github.com/fastlane/monorepo) tools for migrating code and github issues. Specific for fastlane so requires some code changes to use 160 | 161 | ## Development Workflows 162 | 163 | * [Trunk Based Development](https://trunkbaseddevelopment.com), a source-control branching model, where developers collaborate on code in a single branch called ‘trunk’, resist any pressure to create other long-lived development branches by employing documented techniques. They therefore avoid merge hell, do not break the build, and live happily ever after. 164 | * [Branch By Abstraction](https://www.branchbyabstraction.com), is a set-piece technique to effect a ‘longer to complete’ change in the trunk. 165 | 166 | ## License 167 | 168 | 169 | [![CC0](http://mirrors.creativecommons.org/presskit/buttons/88x31/svg/cc-zero.svg)]("http://creativecommons.org/publicdomain/zero/1.0/) 170 | 171 | To the extent possible under law, Uriel Corfa has waived all copyright and related or neighboring rights to this work. 172 | -------------------------------------------------------------------------------- /README-zh-CN.md: -------------------------------------------------------------------------------- 1 | # Awesome Monorepo [![Awesome](https://awesome.re/badge.svg)](https://awesome.re) 2 | 3 | 一个精心策划的关于 Monorepo 工具、软件和架构的列表。 4 | 架构。Monorepos 是单库的简称,是指 5 | 储存库,包含多个项目,通常相互关联。 6 | 彼此相关。 7 | 8 | 灵感来自于 [vinta/awesome-python](https://github.com/vinta/awesome-python). 9 | 10 | [English](./README.md) | 简体中文 11 | 12 | ## 内容 13 | 14 | * [构建系统和依赖性管理工具](#构建系统和依赖性管理工具) 15 | * [仓库管理工具](#仓库管理工具) 16 | * [一些好的参考文献](#一些好的参考文献) 17 | * [版本控制系统和附加组件](#版本控制系统和附加组件) 18 | * [Git](#git) 19 | * [Mercurial](#mercurial) 20 | * [开发流程工具](#开发流程工具) 21 | * [著名的公开 monorepos](#著名的公开-monorepos) 22 | * [迁移工具](#迁移工具) 23 | 24 | ## 构建系统和依赖性管理工具 25 | 26 | * [baur](https://github.com/simplesurance/baur) 只在一个 monorepos 分支中构建已更改的应用程序,并管理构建工件 ![github star](https://img.shields.io/github/stars/simplesurance/baur.svg?style=social&label=Star) 27 | * [Bazel](https://bazel.build) 是谷歌的面向 monorepo 的构建系统。更多关于 Bazel 的信息:[awesome-bazel](https://github.com/jin/awesome-bazel) ![github star](https://img.shields.io/github/stars/jin/awesome-bazel.svg?style=social&label=Star) 28 | * [Bit](https://github.com/teambit/bit) 是一个用于建立和管理具有多个组件的 JavaScript 项目的工具,并管理组件的依赖图。 ![github star](https://img.shields.io/github/stars/teambit/bit.svg?style=social&label=Star) 29 | * [Bolt Pkg](https://github.com/boltpkg/bolt) 是一个超级强大的 JavaScript 项目管理。 ![github star](https://img.shields.io/github/stars/boltpkg/bolt.svg?style=social&label=Star) 30 | * [Buck](https://buckbuild.com/) 是 Facebook 的面向 monorepo 的构建系统。 ![github star](https://img.shields.io/github/stars/facebook/buck.svg?style=social&label=Star) 31 | * [drkns](https://github.com/frantzmiccoli/drkns) 是一个简单的、与语言无关的 monorepo 构建工具。 ![github star](https://img.shields.io/github/stars/frantzmiccoli/drkns.svg?style=social&label=Star) 32 | * [Garment](https://github.com/Farfetch/garment) 是 Farfetch 的 monorepo 构建系统,具有集中和可定制的任务管理。 ![github star](https://img.shields.io/github/stars/Farfetch/garment.svg?style=social&label=Star) 33 | * [GitLab CI](https://gitlab.com/gitlab-org/gitlab-ce/issues/19232) 11.4 支持根据路径变化执行相应的操作。 34 | * [Lerna](https://lerna.js.org/) 是一个用于管理具有多个包的 JavaScript 项目的工具,建立在 Yarn 之上。 ![github star](https://img.shields.io/github/stars/lerna/lerna.svg?style=social&label=Star) 35 | * [MBT](https://github.com/mbtproject/mbt) 是一个具有差异构建支持的构建工具。 ![github star](https://img.shields.io/github/stars/mbtproject/mbt.svg?style=social&label=Star) 36 | * [Nix](https://github.com/NixOS/nix) 是一个具有远程缓存的软件包和发行版构建工具,主要由 NixOS 使用。 ![github star](https://img.shields.io/github/stars/NixOS/nix.svg?style=social&label=Star) 37 | * [Nx](https://nx.dev/) 是一个用于 TypeScript monorepos 的构建系统和一套 monorepo 管理工具。 ![github star](https://img.shields.io/github/stars/nrwl/nx.svg?style=social&label=Star) 38 | * [OAO](https://github.com/guigrpa/oao) 是一个基于 Yarn 的、有观点的 JavaScript monorepo 管理工具。 ![github star](https://img.shields.io/github/stars/guigrpa/oao.svg?style=social&label=Star) 39 | * [Pants](http://www.pantsbuild.org/) 是一个面向 monorepo 的构建系统,被 Twitter、Foursquare 和其他多家公司使用。 ![github star](https://img.shields.io/github/stars/pantsbuild/pants.svg?style=social&label=Star) 40 | * [Please](https://please.build/index.html) 一个跨语言的构建系统,强调高性能、可扩展性和可复制性。 ![github star](https://img.shields.io/github/stars/thought-machine/please.svg?style=social&label=Star) 41 | * [pnpm](https://pnpm.js.org/en/) 是一个 JavaScript 依赖性管理工具,通过一组专门的命令 `pnpm multi` 来支持 monorepos。 ![github star](https://img.shields.io/github/stars/pnpm/pnpm.svg?style=social&label=Star) 42 | * [Rush Stack](https://rushstack.io/) 是一个面向大规模TypeScript monorepos 的工具系列,以[Rush](https://rushjs.io/)构建协调器为基础。 ![github star](https://img.shields.io/github/stars/microsoft/rushstack.svg?style=social&label=Star) 43 | * [Spago](https://github.com/spacchetti/spago) 是一个由Dhall和package-sets 支持的 PureScript 软件包管理器和构建工具。 ![github star](https://img.shields.io/github/stars/spacchetti/spago.svg?style=social&label=Star) 44 | * [Symplify/MonorepoBuilder](https://github.com/Symplify/MonorepoBuilder) 是一个 PHP 的 monorepo 管理工具。 ![github star](https://img.shields.io/github/stars/Symplify/MonorepoBuilder.svg?style=social&label=Star) 45 | * [Tainted](https://github.com/kynrai/tainted) 是一个确定哪些 Go 软件包需要在 monorepo 中重新构建的工具。 ![github star](https://img.shields.io/github/stars/kynrai/tainted.svg?style=social&label=Star) 46 | * [Versio](https://github.com/chaaz/versio) 根据 [conventional commits](https://www.conventionalcommits.org/) 更新 monorepo 项目中的所有版本号,并可以生成更新日志和标签。 ![github star](https://img.shields.io/github/stars/chaaz/versio.svg?style=social&label=Star) 47 | * [Yarn](https://yarnpkg.com/blog/2017/08/02/introducing-workspaces/) 是一个 JavaScript 依赖性管理工具,通过工作空间支持 monorepo。 ![github star](https://img.shields.io/github/stars/yarnpkg/yarn.svg?style=social&label=Star) 48 | * [Layer-pack](https://github.com/layer-pack/layer-pack) 是一个 Webpack 插件,允许通过可继承的 npm 包/代码层和 es6 的 glob 导入来实现 monorepo 结构。 ![github star](https://img.shields.io/github/stars/layer-pack/layer-pack.svg?style=social&label=Star) 49 | 50 | ## 仓库管理工具 51 | 52 | * [Builder](https://github.com/FormidableLabs/builder) 是一个工具,它使得在 Node.js monorepo 中的各个项目之间运送相同的脚本成为可能。例如,跨项目共享构建和测试脚本。 ![github star](https://img.shields.io/github/stars/FormidableLabs/builder.svg?style=social&label=Star) 53 | * [FBShipIt](https://github.com/facebook/fbshipit) 是一个用 Hack 编写的库,用于将提交从一个仓库复制到另一个仓库。 ![github star](https://img.shields.io/github/stars/facebook/fbshipit.svg?style=social&label=Star) 54 | * [adeira/shipit](https://github.com/adeira/shipit) 是 FBShipIt 的一个简化的 JavaScript 移植。 ![github star](https://img.shields.io/github/stars/adeira/shipit.svg?style=social&label=Star) 55 | * [Lank](https://github.com/FormidableLabs/lank) 是一个在 Node.js monorepo 中使用自动配置 `NODE_PATH` 而不是符号链接将包链接在一起的工具。Lank 还允许你在所有(或所有)软件包的子集上运行相同的命令。 ![github star](https://img.shields.io/github/stars/FormidableLabs/lank.svg?style=social&label=Star) 56 | * [monorepo-run](https://github.com/Akryum/monorepo-run) 是一个帮助程序的集合,用于在 yarn monorepo 的每个包中运行脚本,每个包有一个分离的窗格。 ![github star](https://img.shields.io/github/stars/Akryum/monorepo-run.svg?style=social&label=Star) 57 | * [oao](https://github.com/guigrpa/oao) ![github star](https://img.shields.io/github/stars/guigrpa/oao.svg?style=social&label=Star) 58 | * [Syncpack](https://github.com/JamieMason/syncpack) 允许在 Lerna Monorepos 中管理多个 package.json 文件。 ![github star](https://img.shields.io/github/stars/JamieMason/syncpack.svg?style=social&label=Star) 59 | * [Ultra Runner](https://github.com/folke/ultra-runner) 是一个智能脚本运行器和 Lerna、Pnpm、Rush 和 Yarn 的构建工具。脚本同时运行,使用依赖性拓扑结构。构建过程会跟踪文件的变化,并在可能的情况下被跳过。 ![github star](https://img.shields.io/github/stars/folke/ultra-runner.svg?style=social&label=Star) 60 | * [wsrun](https://github.com/whoeverest/wsrun) 允许在Yarn workspaces monorepo 的每个包中运行一个命令。 ![github star](https://img.shields.io/github/stars/whoeverest/wsrun.svg?style=social&label=Star) 61 | 62 | ## 一些好的参考文献 63 | 64 | * [为什么谷歌将数十亿行代码存储在一个仓库中?](https://research.google.com/pubs/pub45424.html) 65 | * [monorepo 的优势和劣势。谷歌的一个案例研究](https://people.engr.ncsu.edu/ermurph3/papers/seip18.pdf) 66 | * [为什么你应该为你公司的所有项目使用一个单一的仓库?](https://www.drmaciver.com/2016/10/why-you-should-use-a-single-repository-for-all-your-companys-projects/) 67 | * [monorepo 的优势](https://danluu.com/monorepo/) 68 | * [Monorepos 使内心的源泉变得鲜活起来](https://kevingoslar.medium.com/monorepos-make-inner-source-come-to-life-bd1592b0cadf) 69 | * [什么是 monorepo?(以及你应该使用它吗?)。](https://semaphoreci.com/blog/what-is-monorepo) 70 | * [为 Semaphore-CI 用户提供 Monorepos 的持续集成。](https://semaphoreci.com/blog/continuous-integration-monorepos) 71 | 72 | ## 版本控制系统和附加组件 73 | 74 | ### Git 75 | 76 | #### 工具 77 | 78 | * [Git浅层克隆](https://git-scm.com/docs/git-clone) 让你只克隆部分的Git历史。 79 | * [如何使用 Git Shallow Clone 来提高性能](https://www.perforce.com/blog/git-beyond-basics-using-shallow-clones) 80 | * [如何用Git处理大的仓库](https://www.atlassian.com/blog/git/handle-big-repositories-git) 81 | * [Git克隆与浅层Git克隆](https://blogs.gnome.org/simos/2009/04/18/git-clones-vs-shallow-git-clones/) 82 | * [Git filter-branch](https://git-scm.com/docs/git-filter-branch) 让你重写版本库的历史和修剪分支。 83 | * [如何用 Git 处理大型仓库](https://www.atlassian.com/blog/git/handle-big-repositories-git) 84 | * [Git clone --single-branch](https://git-scm.com/docs/git-clone) 85 | * [如何用 Git 处理大型仓库](https://www.atlassian.com/blog/git/handle-big-repositories-git) 86 | * [Git sparse-checkout](https://git-scm.com/docs/git-read-tree/) 87 | * [从 Git 克隆特定文件夹](https://lakehanne.github.io/git-sparse-checkout) 88 | * [如何用 Git 处理大型仓库](https://www.atlassian.com/blog/git/handle-big-repositories-git) 89 | * [Git LFS](https://git-lfs.github.com/) 改善了 Git 中对大文件的处理。 90 | * [GVFS](https://github.com/Microsoft/GVFS) 虚拟化你的 git repo 下面的文件系统,这样 git 和所有工具看到的似乎是一个正常的 repo,但 GVFS 只在需要时下载对象。仅适用 于Windows。 ![github star](https://img.shields.io/github/stars/Microsoft/GVFS.svg?style=social&label=Star) 91 | * [SlothFS](https://gerrit.googlesource.com/gitfs/+/HEAD/docs/manual.md) 与 GVFS 类似,但只读。它在 Linux 和 macOS 上工作。 92 | * [git subtree](https://github.com/apenwarr/git-subtree) 将你的项目中的子树合并和拆分到子项目中,然后再返回。从1.7版本开始成为 Git 的一部分。 ![github star](https://img.shields.io/github/stars/apenwarr/git-subtree.svg?style=social&label=Star) 93 | * [git subsplit](https://github.com/dflydev/git-subsplit) 自动并简化了管理单向只读子树分割的过程。 ![github star](https://img.shields.io/github/stars/dflydev/git-subsplit.svg?style=social&label=Star) 94 | * [splitsh-lite](https://github.com/splitsh/lite) 是一个非常快速的 git subtree 替代品,可以将项目中的子树分割成子项目。 ![github star](https://img.shields.io/github/stars/splitsh/lite.svg?style=social&label=Star) 95 | * [josh](https://github.com/esrlabs/josh) 是一个 git 服务器代理,可以实现仓库的即时虚拟化。 ![github star](https://img.shields.io/github/stars/esrlabs/josh.svg?style=social&label=Star) 96 | * [go-diff](https://github.com/dstreamcloud/go-diff) 是一个方便的工具,可以分析哪些软件包由于变化而需要重建。 ![github star](https://img.shields.io/github/stars/dstreamcloud/go-diff.svg?style=social&label=Star) 97 | * [mgt](https://github.com/nikita-skobov/monorepo-git-tools) 是一个工具,通过定义如何重新映射仓库的文件,使多个仓库之间的双向同步变得容易。 ![github star](https://img.shields.io/github/stars/nikita-skobov/monorepo-git-tools.svg?style=social&label=Star) 98 | 99 | #### 扩展信息 100 | 101 | * Atlassian 的 [Git 中的 Monorepos](https://developer.atlassian.com/blog/2015/10/monorepos-in-git/) 和[如何在 Git 中处理大的仓库](https://www.atlassian.com/blog/git/handle-big-repositories-git)涵盖了 Git 的扩展选项。 102 | 103 | ### Mercurial 104 | 105 | #### 工具 106 | 107 | * [Watchman](https://github.com/facebook/watchman),当文件更改时,[fsmonitor](https://www.mercurial-scm.org/wiki/FsMonitorExtension) 将触发部分增量构建 108 | 109 | #### 扩展信息 110 | 111 | * [在 Facebook 扩展 Mercurial 的规模](https://code.facebook.com/posts/218678814984400/scaling-mercurial-at-facebook/) 112 | 113 | ## 开发流程工具 114 | 115 | ### Code reviews 116 | 117 | * [Pull Review](https://github.com/imsky/pull-review/) Hubot 插件用于自动拉动评论,有很多配置选项。 ![github star](https://img.shields.io/github/stars/imsky/pull-review.svg?style=social&label=Star) 118 | * [Rietveld](https://github.com/rietveld-codereview/rietveld) 是谷歌的一个代码审查工具,被 Chromium 使用。 ![github star](https://img.shields.io/github/stars/rietveld-codereview/rietveld.svg?style=social&label=Star) 119 | * [API Extractor](https://api-extractor.com/) 是用来检测和审查 TypeScript 库的 API 签名的,也是用来发布多包 API 文档。 ![github star](https://img.shields.io/github/stars/microsoft/rushstack.svg?style=social&label=Star) 120 | 121 | ### CI 工具 122 | 123 | * [在 Jenkins 中使用 Bazel 的增量 CI](https://www.kchodorow.com/blog/2015/10/15/one-weird-trick-for-fast-ci/),文章作者 Kristina Chodorow(Bazel团队)。 124 | * [bazel-travis](https://github.com/korfuri/bazel-travis) 这是一个在 Bazel monorepo 中使用 Travis CI 的最小设置。 ![github star](https://img.shields.io/github/stars/korfuri/bazel-travis.svg?style=social&label=Star) 125 | * [buildpipe](https://github.com/jwplayer/buildpipe) 是一个通过观察项目的变化来动态生成 Buildkite 管道的工具。 ![github star](https://img.shields.io/github/stars/jwplayer/buildpipe.svg?style=social&label=Star) 126 | * [Codefresh](https://codefresh.io/) 是一个针对 Docker/Kubernetes 的 CI/CD 平台,具有原生 [Monorepo 支持](https://codefresh.io/continuous-integration/using-codefresh-with-mono-repos/)。 127 | * [使用 Monorepos 进行微服务的 CI/CD](http://blog.shippable.com/ci/cd-of-microservices-using-mono-repos) 这是一篇描述 Shippable.com 构建的文章,旨在触发特定于实际被修改的微服务和依赖于它的服务的构建。 128 | * [Semaphore CI](https://semaphoreci.com) 是一个 CI/CD 平台,原生的 [monorepo 支持](https://docs.semaphoreci.com/essentials/building-monorepo-projects/)。 129 | 130 | ### Code ownership 131 | 132 | * [GitHub's CODEOWNERS](https://help.github.com/articles/about-codeowners/) GitHub 的 CODEOWNERS 可以限制谁可以批准影响 monorepo 某一特定部分的 pull request。 133 | * [Chromium 的 OWNERS 文件](https://chromium.googlesource.com/chromium/src/+/master/docs/code_reviews.md#OWNERS-files)启发了 GitHub 的 CODEOWNERS。 134 | * [Write Guard](https://github.com/geritol/write-guard) 使用 GitHub 的 actions 来强制执行对 monorepo 项目的文件级写权限。 135 | * [CODEOWNERS 生成器](https://github.com/gagoar/codeowners-generator) 从子文件夹中的文件为你的 monorepo 生成一个 CODEOWNERS 文件。 136 | 137 | ## 著名的公开 monorepos 138 | 139 | * [Foursquare的开源项目](https://github.com/foursquare/fsqio) ![github star](https://img.shields.io/github/stars/foursquare/fsqio.svg?style=social&label=Star) 140 | * [Stellar 的 Go monorepo](https://github.com/stellar/go) ![github star](https://img.shields.io/github/stars/stellar/go.svg?style=social&label=Star) 141 | * [Habitat 的 monorepo](https://github.com/habitat-sh/habitat) ![github star](https://img.shields.io/github/stars/habitat-sh/habitat.svg?style=social&label=Star) 142 | * [startup-os monorepo:谷歌开源工具(bazel等)在 monorepo 中的工作实例](https://github.com/google/startup-os) ![github star](https://img.shields.io/github/stars/google/startup-os.svg?style=social&label=Star) 143 | * [M3 monorepo - 分布式TSDB,聚合器和查询引擎,Prometheus Sidecar,度量衡平台](https://github.com/m3db/m3) ![github star](https://img.shields.io/github/stars/m3db/m3.svg?style=social&label=Star) 144 | * [Entria 的全栈式 Playground Monorepo](https://github.com/entria/entria-fullstack) ![github star](https://img.shields.io/github/stars/entria/entria-fullstack.svg?style=social&label=Star) 145 | * [Berty 的 monorepo - React-native 移动应用程序 + Golang 后端 + Gomobile bridge + iOS & Android 原生驱动 + Protobuf](https://github.com/berty/berty/) ![github star](https://img.shields.io/github/stars/berty/berty.svg?style=social&label=Star) 146 | * [NixOS 的软件包和模块的 monorepo 可用于增量构建和部署 Linux 机器。](https://github.com/NixOS/nixpkgs/) ![github star](https://img.shields.io/github/stars/NixOS/nixpkgs.svg?style=social&label=Star) 147 | * [Celo 的 monorepo(包括区块链、杂项工具、库、操作东西诸如 terraform 模块、文档等)](https://github.com/celo-org/celo-monorepo)。 ![github star](https://img.shields.io/github/stars/celo-org/celo-monorepo.svg?style=social&label=Star) 148 | 149 | ## 迁移工具 150 | 151 | * [Bazel 的 migration-tooling](https://github.com/bazelbuild/migration-tooling) 仓库。 ![github star](https://img.shields.io/github/stars/bazelbuild/migration-tooling.svg?style=social&label=Star) 152 | * [Gazelle](https://github.com/bazelbuild/rules_go#generating-build-files) 为 Go 软件包自动生成 Bazel BUILD 文件。 ![github star](https://img.shields.io/github/stars/bazelbuild/rules_go.svg?style=social&label=Star) 153 | * [tomono](https://github.com/unravelin/tomono) 将一组现有的Git仓库导入到一个单仓库中。 ![github star](https://img.shields.io/github/stars/unravelin/tomono.svg?style=social&label=Star) 154 | * [shopsys/monorepo-tools](https://github.com/shopsys/monorepo-tools) 包含一套用于构建和拆分单体仓库的工具。 ![github star](https://img.shields.io/github/stars/shopsys/monorepo-tools.svg?style=social&label=Star) 155 | * [Fastlane monorepo migration tools](https://github.com/fastlane/monorepo) 用于迁移代码和 github issues 的工具。专为 fastlane 设计,所以需要修改一些代码才能使用。 ![github star](https://img.shields.io/github/stars/fastlane/monorepo.svg?style=social&label=Star) 156 | 157 | ## 开发工作流 158 | 159 | * [基于主干的开发](https://trunkbaseddevelopment.com),是一种源码控制的分支模式,开发人员在被称为 "主干 "的单一分支上进行代码协作,通过采用文档技术,抵制任何创建其他长效开发分支的压力。因此,他们避免了合并地狱,不破坏构建,并从此幸福地生活在一起。 160 | * [抽象的分支](https://www.branchbyabstraction.com),是一个套路的技术,以实现树干的 "较长完成 "的变化。 161 | 162 | ## License 163 | 164 | [![CC0](http://mirrors.creativecommons.org/presskit/buttons/88x31/svg/cc-zero.svg)]("http://creativecommons.org/publicdomain/zero/1.0/) 165 | 166 | 在法律允许的范围内,Uriel Corfa 已经放弃了本作品的所有版权和相关或邻近的权利。 167 | --------------------------------------------------------------------------------