Skip to content

Commit 59e780e

Browse files
committed
add mono vs multi repo approaches on source control page
1 parent 383708e commit 59e780e

File tree

2 files changed

+62
-8
lines changed

2 files changed

+62
-8
lines changed

content/pages/02-development-environments/19-source-control.markdown

Lines changed: 45 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,27 @@ project should immediately begin by using a version control system such
2828
as Git or Mercurial.
2929

3030

31+
## Monorepo vs Multirepo
32+
There is a spectrum of philosophies for how to store projects within
33+
source code repositories.
34+
35+
On one extreme end of the spectrum, every line of code for every project
36+
within an organization is stored **in a single repository**. That approach
37+
is called *monorepo* and it is used by companies like Google. On the other
38+
end of the spectrum, there are potentially tens of thousands or more
39+
repositories that store parts of projects. That approach is known as
40+
*multirepo* or *manyrepo*.
41+
42+
For example, in a [microservices](/microservices.html) architecture, there
43+
could be thousands of microservices and each one is stored within its own
44+
repository. No one repository contains the code for the entire application
45+
created by the interaction of the microservices.
46+
47+
There are many hybrid strategies for how to store source code that fall
48+
between these opposite approaches. What to choose will depend on your
49+
organization's needs, resources and culture.
50+
51+
3152
## Source control during deployment
3253
Pulling code during a deployment is a potential way source control systems fit
3354
into the deployment process.
@@ -121,12 +142,36 @@ control services are:
121142
* [About version control](http://git-scm.com/book/en/Getting-Started-About-Version-Control)
122143
reviews the basics of distributed version control systems.
123144

145+
* [Why not Git?](https://sqlite.org/whynotgit.html) covers
146+
[SQLite](/sqlite.html)'s development workflow and why they do not
147+
use [Git](/git.html) as their version control system.
148+
149+
150+
### Monorepo vs multirepo resources
151+
Monorepo versus multirepo version control strategies are a weirdly
152+
contentious topic in software development, likely because once a policy
153+
is set for an organization it is exceptionally difficult to change
154+
your approach. The following resources give more insight into the debate
155+
on how to structure your repositories.
156+
124157
* [Monorepo, Manyrepo, Metarepo](http://notes.burke.libbey.me/metarepo/)
125158
is an awesome guide to varying ways of structuring your source repositories
126159
that contain more than one project. The guide covers advantages and
127160
disadvantages of common approaches used in both small and large
128161
organizations.
129162

163+
* [Repo Style Wars: Mono vs Multi](http://www.gigamonkeys.com/mono-vs-multi/)
164+
goes into the implications of using one side or the other and why it is
165+
unlikely you can create a combination solution that will give you the
166+
advantages of both without the disadvantages.
167+
168+
* [Why Google Stores Billions of Lines of Code in a Single Repository](https://cacm.acm.org/magazines/2016/7/204032-why-google-stores-billions-of-lines-of-code-in-a-single-repository/fulltext)
169+
170+
* [Advantages of monorepos](http://danluu.com/monorepo/) goes into the
171+
advantages of using a monorepo and does not discuss the downsides but
172+
admits there are many so the decision is not clear-cut on using either
173+
strategy.
174+
130175

131176
### Git distributed source control system
132177
[Git](/git.html) is the most widely-used source control system currently
@@ -136,14 +181,6 @@ and out of a centralized repository, which is a problem when using
136181
[a full page on Git](/git.html) with further details and resources.
137182

138183

139-
### GitHub resources
140-
* [A Beginner’s Git and GitHub Tutorial](http://blog.udacity.com/2015/06/a-beginners-git-github-tutorial.html)
141-
142-
* [Hello World: GitHub edition](https://guides.github.com/activities/hello-world/)
143-
144-
* [Git and GitHub learning resources](https://help.github.com/articles/git-and-github-learning-resources/)
145-
146-
147184
### Subversion resources
148185
[Apache Subversion](https://subversion.apache.org/)
149186
([source code](https://subversion.apache.org/source-code.html)),

content/pages/02-development-environments/20-git.markdown

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,3 +218,20 @@ minimize merge conflicts.
218218
* [Comparing workflows](https://www.atlassian.com/git/tutorials/comparing-workflows)
219219
provides a slew of examples for how developers on a team can handle merge
220220
conflicts and other situations that commonly arise when using Git.
221+
222+
223+
### GitHub resources
224+
GitHub is a software-as-a-service application
225+
[now owned by Microsoft](https://blogs.microsoft.com/blog/2018/06/04/microsoft-github-empowering-developers/)
226+
that makes it easier to collaborate with other developers on centralized
227+
Git repositories. The site also provides a remote backup location for
228+
repositories as well as secure, private repository storage. The following
229+
tutorials show how to get started using Git on GitHub.
230+
231+
* [A Beginner’s Git and GitHub Tutorial](http://blog.udacity.com/2015/06/a-beginners-git-github-tutorial.html)
232+
233+
* [Hello World: GitHub edition](https://guides.github.com/activities/hello-world/)
234+
235+
* [Git and GitHub learning resources](https://help.github.com/articles/git-and-github-learning-resources/)
236+
237+

0 commit comments

Comments
 (0)