1 <!-- doc/src/sgml/sourcerepo.sgml -->
3 <appendix id=
"sourcerepo">
4 <title>The Source Code Repository
</title>
7 The
<productname>PostgreSQL
</productname> source code is stored and managed
8 using the
<productname>Git
</productname> version control system. A public
9 mirror of the master repository is available; it is updated within a minute
10 of any change to the master repository.
15 url=
"https://wiki.postgresql.org/wiki/Working_with_Git"></ulink>,
16 has some discussion on working with Git.
20 <title>Getting the Source via
<productname>Git
</productname></title>
23 With
<productname>Git
</productname> you will make a copy of the entire code repository
24 on your local machine, so you will have access to all history and branches
25 offline. This is the fastest and most flexible way to develop or test
34 You will need an installed version of
<productname>Git
</productname>, which you can
35 get from
<ulink url=
"https://git-scm.com"></ulink>. Many systems already
36 have a recent version of
<application>Git
</application> installed by default, or
37 available in their package distribution system.
43 To begin using the Git repository, make a clone of the official mirror:
46 git clone https://git.postgresql.org/git/postgresql.git
49 This will copy the full repository to your local machine, so it may take
50 a while to complete, especially if you have a slow Internet connection.
51 The files will be placed in a new subdirectory
<filename>postgresql
</filename> of
52 your current directory.
56 The Git mirror can also be reached via the Git protocol. Just change the URL
57 prefix to
<literal>git
</literal>, as in:
60 git clone git://git.postgresql.org/git/postgresql.git
68 Whenever you want to get the latest updates in the system,
<command>cd
</command>
69 into the repository, and run:
79 <productname>Git
</productname> can do a lot more things than just fetch the source. For
80 more information, consult the
<productname>Git
</productname> man pages, or see the
81 website at
<ulink url=
"https://git-scm.com"></ulink>.