docs: add SHA256 sum for 19.2.0
[mesa.git] / docs / repository.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html lang="en">
3 <head>
4 <meta http-equiv="content-type" content="text/html; charset=utf-8">
5 <title>Source Code Repository</title>
6 <link rel="stylesheet" type="text/css" href="mesa.css">
7 </head>
8 <body>
9
10 <div class="header">
11 The Mesa 3D Graphics Library
12 </div>
13
14 <iframe src="contents.html"></iframe>
15 <div class="content">
16
17 <h1>Source Code Repository</h1>
18
19 <p>
20 Mesa uses <a href="https://git-scm.com">git</a>
21 as its source code management system.
22 </p>
23
24 <p>
25 The master git repository is hosted on
26 <a href="https://www.freedesktop.org">freedesktop.org</a>.
27 </p>
28
29 <p>
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>
33 (read/write).
34 </p>
35
36 <p>
37 You may also
38 <a href="https://gitlab.freedesktop.org/mesa/mesa"
39 >browse the main Mesa git repository</a> and the
40 <a href="https://gitlab.freedesktop.org/mesa/demos"
41 >Mesa demos and tests git repository</a>.
42 </p>
43
44
45 <h2 id="anonymous">Anonymous git Access</h2>
46
47 <p>
48 To get the Mesa sources anonymously (read-only):
49 </p>
50
51 <ol>
52 <li>Install the git software on your computer if needed.
53 <li>Get an initial, local copy of the repository with:
54 <pre>git clone https://gitlab.freedesktop.org/mesa/mesa.git</pre>
55 <li>Later, you can update your tree from the master repository with:
56 <pre>git pull origin</pre>
57 <li>If you also want the Mesa demos/tests repository:
58 <pre>git clone https://gitlab.freedesktop.org/mesa/demos.git</pre>
59 </ol>
60
61
62 <h2 id="developer">Developer git Access</h2>
63
64 <p>
65 If you wish to become a Mesa developer with git-write privilege, please
66 follow this procedure:
67 </p>
68 <ol>
69 <li>Subscribe to the
70 <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev">mesa-dev</a>
71 mailing list.
72 <li>Start contributing to the project by
73 <a href="submittingpatches.html" target="_parent">submitting patches</a> to
74 the mesa-dev list. Specifically,
75 <ul>
76 <li>Use <code>git send-mail</code> to post your patches to mesa-dev.
77 <li>Wait for someone to review the code and give you a <code>Reviewed-by</code>
78 statement.
79 <li>You'll have to rely on another Mesa developer to push your initial patches
80 after they've been reviewed.
81 </ul>
82 <li>After you've demonstrated the ability to write good code and have had
83 a dozen or so patches accepted you can apply for an account.
84 <li>Occasionally, but rarely, someone may be given a git account sooner, but
85 only if they're being supervised by another Mesa developer at the same
86 organization and planning to work in a limited area of the code or on a
87 separate branch.
88 <li>To apply for an account, follow
89 <a href="https://www.freedesktop.org/wiki/AccountRequests">these directions</a>.
90 It's also appreciated if you briefly describe what you intend to do (work
91 on a particular driver, add a new extension, etc.) in the bugzilla record.
92 </ol>
93
94 <p>
95 Once your account is established, you can update your push url to use SSH:
96 <pre>
97 git remote set-url --push <em>origin</em> git@gitlab.freedesktop.org:mesa/mesa.git
98 </pre>
99
100 You can also use <a href="https://gitlab.freedesktop.org/profile/personal_access_tokens">personal access tokens</a>
101 to push over HTTPS instead (useful for people behind strict proxies).
102 In this case, create a token, and put it in the url as shown here:
103 <pre>
104 git remote set-url --push <em>origin</em> https://<em>USER</em>:<em>TOKEN</em>@gitlab.freedesktop.org/mesa/mesa.git
105 </pre>
106
107
108 <h2>Windows Users</h2>
109
110 <p>
111 If you're <a href="https://git.wiki.kernel.org/index.php/WindowsInstall">
112 using git on Windows</a> you'll want to enable automatic CR/LF conversion in
113 your local copy of the repository:
114 </p>
115 <pre>
116 git config --global core.autocrlf true
117 </pre>
118
119 <p>
120 This will cause git to convert all text files to CR+LF on checkout,
121 and to LF on commit.
122 </p>
123 <p>
124 Unix users don't need to set this option.
125 </p>
126
127
128 <h2>Development Branches</h2>
129
130 <p>
131 At any given time, there may be several active branches in Mesa's
132 repository.
133 Generally, <code>master</code> contains the latest development (unstable)
134 code while a branch has the latest stable code.
135 </p>
136
137 <p>
138 The command <code>git branch</code> will list all available branches.
139 </p>
140
141 <p>
142 Questions about branch status/activity should be posted to the
143 mesa-dev mailing list.
144 </p>
145
146 <h2>Developer Git Tips</h2>
147
148 <ol>
149 <li>Setting up to edit the master branch
150 <p>
151 If you try to do a pull by just saying<code> git pull </code>
152 and git complains that you have not specified a
153 branch, try:
154 <pre>
155 git config branch.master.remote origin
156 git config branch.master.merge master
157 </pre>
158 <p>
159 Otherwise, you have to say<code> git pull origin master </code>
160 each time you do a pull.
161 </p>
162 <li>Small changes to master
163 <p>
164 If you are an experienced git user working on substantial modifications,
165 you are probably
166 working on a separate branch and would rebase your branch prior to
167 merging with master.
168 But for small changes to the master branch itself,
169 you also need to use the rebase feature in order to avoid an
170 unnecessary and distracting branch in master.
171 </p>
172 <p>
173 If it has been awhile since you've done the initial clone, try
174 <pre>
175 git pull
176 </pre>
177 <p>
178 to get the latest files before you start working.
179 </p>
180 <p>
181 Make your changes and use
182 <pre>
183 git add &lt;files to commit&gt;
184 git commit
185 </pre>
186 <p>
187 to get your changes ready to push back into the fd.o repository.
188 </p>
189 <p>
190 It is possible (and likely) that someone has changed master since
191 you did your last pull. Even if your changes do not conflict with
192 their changes, git will make a fast-forward
193 merge branch, branching from the point in time
194 where you did your last pull and merging it to a point after the other changes.
195 </p>
196 <p>
197 To avoid this,
198 <pre>
199 git pull --rebase
200 git push
201 </pre>
202 <p>
203 If you are familiar with CVS or similar system, this is similar to doing a
204 <code> cvs update </code> in order to update your source tree to
205 the current repository state, instead of the time you did the last update.
206 (CVS doesn't work like git in this respect, but this is easiest way
207 to explain it.)
208 </p>
209 <p>
210 In any case, your repository now looks like you made your changes after
211 all the other changes.
212 </p>
213 <p>
214 If the rebase resulted in conflicts or changes that could affect
215 the proper operation of your changes, you'll need to investigate
216 those before doing the push.
217 </p>
218 <p>
219 If you want the rebase action to be the default action, then
220 <pre>
221 git config branch.master.rebase true
222 git config --global branch.autosetuprebase=always
223 </pre>
224 <p>
225 See <a href="https://www.eecs.harvard.edu/~cduan/technical/git/">Understanding Git Conceptually</a> for a fairly clear explanation about all of this.
226 </p>
227 </ol>
228
229 </div>
230 </body>
231 </html>