Clone of mesa.
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

repository.html 5.5KB

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