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