1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
4 <meta http-equiv=
"content-type" content=
"text/html; charset=utf-8">
5 <title>Code Repository
</title>
6 <link rel=
"stylesheet" type=
"text/css" href=
"mesa.css">
11 <h1>The Mesa
3D Graphics Library
</h1>
14 <iframe src=
"contents.html"></iframe>
17 <h1>Code Repository
</h1>
20 Mesa uses
<a href=
"https://git-scm.com">git
</a>
21 as its source code management system.
25 The master git repository is hosted on
26 <a href=
"https://www.freedesktop.org">freedesktop.org
</a>.
30 You may access the repository either as an
31 <a href=
"#anonymous">anonymous user
</a> (read-only) or as a
32 <a href=
"#developer">developer
</a>
38 <a href=
"https://cgit.freedesktop.org/mesa/mesa/"
39 >browse the main Mesa git repository
</a> and the
40 <a href=
"https://cgit.freedesktop.org/mesa/demos"
41 >Mesa demos and tests git repository
</a>.
45 <h2 id=
"anonymous">Anonymous git Access
</h2>
48 To get the Mesa sources anonymously (read-only):
52 <li>Install the git software on your computer if needed.
<br><br>
53 <li>Get an initial, local copy of the repository with:
55 git clone git://anongit.freedesktop.org/git/mesa/mesa
57 <li>Later, you can update your tree from the master repository with:
61 <li>If you also want the Mesa demos/tests repository:
63 git clone git://anongit.freedesktop.org/git/mesa/demos
68 <h2 id=
"developer">Developer git Access
</h2>
71 If you wish to become a Mesa developer with git-write privilege, please
72 follow this procedure:
76 <a href=
"https://lists.freedesktop.org/mailman/listinfo/mesa-dev">mesa-dev
</a>
78 <li>Start contributing to the project by
79 <a href=
"submittingpatches.html" target=
"_parent">submitting patches
</a> to
80 the mesa-dev list. Specifically,
82 <li>Use
<code>git send-mail
</code> to post your patches to mesa-dev.
83 <li>Wait for someone to review the code and give you a
<code>Reviewed-by
</code>
85 <li>You'll have to rely on another Mesa developer to push your initial patches
86 after they've been reviewed.
88 <li>After you've demonstrated the ability to write good code and have had
89 a dozen or so patches accepted you can apply for an account.
90 <li>Occasionally, but rarely, someone may be given a git account sooner, but
91 only if they're being supervised by another Mesa developer at the same
92 organization and planning to work in a limited area of the code or on a
94 <li>To apply for an account, follow
95 <a href=
"https://www.freedesktop.org/wiki/AccountRequests">these directions
</a>.
96 It's also appreciated if you briefly describe what you intend to do (work
97 on a particular driver, add a new extension, etc.) in the bugzilla record.
101 Once your account is established:
105 <li>Get an initial, local copy of the repository with:
107 git clone git+ssh://username@git.freedesktop.org/git/mesa/mesa
109 Replace
<em>username
</em> with your actual login name.
<br><br>
110 <li>Later, you can update your tree from the master repository with:
114 <li>If you also want the Mesa demos/tests repository:
116 git clone git+ssh://username@git.freedesktop.org/git/mesa/demos
121 <h2>Windows Users
</h2>
124 If you're
<a href=
"https://git.wiki.kernel.org/index.php/WindowsInstall">
125 using git on Windows
</a> you'll want to enable automatic CR/LF conversion in
126 your local copy of the repository:
129 git config --global core.autocrlf true
133 This will cause git to convert all text files to CR+LF on checkout,
137 Unix users don't need to set this option.
142 <h2>Development Branches
</h2>
145 At any given time, there may be several active branches in Mesa's
147 Generally,
<tt>master
</tt> contains the latest development (unstable)
148 code while a branch has the latest stable code.
152 The command
<code>git-branch
</code> will list all available branches.
156 Questions about branch status/activity should be posted to the
157 mesa3d-dev mailing list.
160 <h2>Developer Git Tips
</h2>
163 <li>Setting up to edit the master branch
165 If you try to do a pull by just saying
<code> git pull
</code>
166 and git complains that you have not specified a
169 git config branch.master.remote origin
170 git config branch.master.merge master
173 Otherwise, you have to say
<code> git pull origin master
</code>
174 each time you do a pull.
176 <li>Small changes to master
178 If you are an experienced git user working on substantial modifications,
180 working on a separate branch and would rebase your branch prior to
182 But for small changes to the master branch itself,
183 you also need to use the rebase feature in order to avoid an
184 unnecessary and distracting branch in master.
187 If it has been awhile since you've done the initial clone, try
192 to get the latest files before you start working.
195 Make your changes and use
197 git add
<files to commit
>
201 to get your changes ready to push back into the fd.o repository.
204 It is possible (and likely) that someone has changed master since
205 you did your last pull. Even if your changes do not conflict with
206 their changes, git will make a fast-forward
207 merge branch, branching from the point in time
208 where you did your last pull and merging it to a point after the other changes.
217 If you are familiar with CVS or similar system, this is similar to doing a
218 <code> cvs update
</code> in order to update your source tree to
219 the current repository state, instead of the time you did the last update.
220 (CVS doesn't work like git in this respect, but this is easiest way
223 In any case, your repository now looks like you made your changes after
224 all the other changes.
227 If the rebase resulted in conflicts or changes that could affect
228 the proper operation of your changes, you'll need to investigate
229 those before doing the push.
232 If you want the rebase action to be the default action, then
234 git config branch.master.rebase true
235 git config --global branch.autosetuprebase=always
238 See
<a href=
"https://www.eecs.harvard.edu/~cduan/technical/git/">Understanding Git Conceptually
</a> for a fairly clear explanation about all of this.