docs: fix html end/start tags
[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>Code Repository</title>
6 <link rel="stylesheet" type="text/css" href="mesa.css">
7 </head>
8 <body>
9
10 <h1>Code Repository</h1>
11
12 <p>
13 Mesa uses <a href="http://git.or.cz/"target="_parent">git</a>
14 as its source code management system.
15 </p>
16
17 <p>
18 The master git repository is hosted on
19 <a href="http://www.freedesktop.org" target="_parent">freedesktop.org</a>.
20 </p>
21
22 <p>
23 You may access the repository either as an
24 <a href="#anonymous">anonymous user</a> (read-only) or as a
25 <a href="#developer">developer</a>
26 (read/write).
27 </p>
28
29 <p>
30 You may also
31 <a href="http://cgit.freedesktop.org/mesa/mesa/"
32 target="_parent">browse the main Mesa git repository</a> and the
33 <a href="http://cgit.freedesktop.org/mesa/demos"
34 target="_parent">Mesa demos and tests git repository</a>.
35 </p>
36
37
38 <a name="anonymous">
39 <H2>Anonymous git Access</H2>
40
41 <p>
42 To get the Mesa sources anonymously (read-only):
43 </p>
44
45 <ol>
46 <li>Install the git software on your computer if needed.<br><br>
47 <li>Get an initial, local copy of the repository with:
48 <pre>
49 git clone git://anongit.freedesktop.org/git/mesa/mesa
50 </pre>
51 <li>Later, you can update your tree from the master repository with:
52 <pre>
53 git pull origin
54 </pre>
55 <li>If you also want the Mesa demos/tests repository:
56 <pre>
57 git clone git://anongit.freedesktop.org/git/mesa/demos
58 </pre>
59 </ol>
60
61
62 <a name="developer">
63 <H2>Developer git Access</H2>
64
65 <p>
66 Mesa developers need to first have an account on
67 <a href="http://www.freedesktop.org" target="_parent">freedesktop.org</a>.
68 To get an account, please ask Brian or the other Mesa developers for
69 permission.
70 Then, if there are no objections, follow this
71 <a href="http://www.freedesktop.org/wiki/AccountRequests" target="_parent">
72 procedure</a>.
73 </p>
74
75 <p>
76 Once your account is established:
77 </p>
78
79 <ol>
80 <li>Install the git software on your computer if needed.<br><br>
81 <li>Get an initial, local copy of the repository with:
82 <pre>
83 git clone git+ssh://username@git.freedesktop.org/git/mesa/mesa
84 </pre>
85 Replace <em>username</em> with your actual login name.<br><br>
86 <li>Later, you can update your tree from the master repository with:
87 <pre>
88 git pull origin
89 </pre>
90 <li>If you also want the Mesa demos/tests repository:
91 <pre>
92 git clone git+ssh://username@git.freedesktop.org/git/mesa/demos
93 </pre>
94 </ol>
95
96
97 <H2>Windows Users</H2>
98
99 <p>
100 If you're <a href="http://git.or.cz/gitwiki/WindowsInstall" target="_parent">
101 using git on Windows</a> you'll want to enable automatic CR/LF conversion in
102 your local copy of the repository:
103 </p>
104 <pre>
105 git config --global core.autocrlf true
106 </pre>
107
108 <p>
109 This will cause git to convert all text files to CR+LF on checkout,
110 and to LF on commit.
111 </p>
112 <p>
113 Unix users don't need to set this option.
114 </p>
115 <br>
116
117
118 <a name="developer">
119 <H2>Development Branches</H2>
120
121 <p>
122 At any given time, there may be several active branches in Mesa's
123 repository.
124 Generally, the trunk contains the latest development (unstable)
125 code while a branch has the latest stable code.
126 </p>
127
128 <p>
129 The command <code>git-branch</code> will list all available branches.
130 </p>
131
132 <p>
133 Questions about branch status/activity should be posted to the
134 mesa3d-dev mailing list.
135 </p>
136
137 <H2>Developer Git Tips</H2>
138
139 <ol>
140 <li>Setting up to edit the master branch
141 <p>
142 If you try to do a pull by just saying<code> git pull </code>
143 and git complains that you have not specified a
144 branch, try:
145 <pre>
146 git config branch.master.remote origin
147 git config branch.master.merge master
148 </pre>
149 <p>
150 Otherwise, you have to say<code> git pull origin master </code>
151 each time you do a pull.
152 </p>
153 <li>Small changes to master
154 <p>
155 If you are an experienced git user working on substancial modifications,
156 you are probably
157 working on a separate branch and would rebase your branch prior to
158 merging with master.
159 But for small changes to the master branch itself,
160 you also need to use the rebase feature in order to avoid an
161 unnecessary and distracting branch in master.
162 </p>
163 <p>
164 If it has been awhile since you've done the initial clone, try
165 <pre>
166 git pull
167 </pre>
168 <p>
169 to get the latest files before you start working.
170 </p>
171 <p>
172 Make your changes and use
173 <pre>
174 git add &lt;files to commit&gt;
175 git commit
176 </pre>
177 <p>
178 to get your changes ready to push back into the fd.o repository.
179 </p>
180 <p>
181 It is possible (and likely) that someone has changed master since
182 you did your last pull. Even if your changes do not conflict with
183 their changes, git will make a fast-forward
184 merge branch, branching from the point in time
185 where you did your last pull and merging it to a point after the other changes.
186 </p>
187 <p>
188 To avoid this,
189 <pre>
190 git pull --rebase
191 git push
192 </pre>
193 <p>
194 If you are familiar with CVS or similar system, this is similar to doing a
195 <code> cvs update </code> in order to update your source tree to
196 the current repository state, instead of the time you did the last update.
197 (CVS doesn't work like git in this respect, but this is easiest way
198 to explain it.)
199 <br>
200 In any case, your repository now looks like you made your changes after
201 all the other changes.
202 </p>
203 <p>
204 If the rebase resulted in conflicts or changes that could affect
205 the proper operation of your changes, you'll need to investigate
206 those before doing the push.
207 </p>
208 <p>
209 If you want the rebase action to be the default action, then
210 <pre>
211 git config branch.master.rebase true
212 git config --global branch.autosetuprebase=always
213 </pre>
214 <p>
215 See <a href="http://www.eecs.harvard.edu/~cduan/technical/git/" target="_parent">Understanding Git Conceptually</a> for a fairly clear explanation about all of this.
216 </p>
217 </ol>
218
219 </body>
220 </html>