1 <html devsite><head> 2 <title>Repo </title> 3 <meta name="project_path" value="/_project.yaml"/> 4 <meta name="book_path" value="/_book.yaml"/> 5 </head> 6 <body> 7 <!-- 8 Copyright 2017 The Android Open Source Project 9 10 Licensed under the Apache License, Version 2.0 (the "License"); 11 you may not use this file except in compliance with the License. 12 You may obtain a copy of the License at 13 14 http://www.apache.org/licenses/LICENSE-2.0 15 16 Unless required by applicable law or agreed to in writing, software 17 distributed under the License is distributed on an "AS IS" BASIS, 18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 See the License for the specific language governing permissions and 20 limitations under the License. 21 --> 22 23 <p> Repo </p> 24 <pre><code>repo <em><COMMAND></em> <em><OPTIONS></em> 25 </code></pre> 26 <p> [ ] </p> 27 <pre><code>repo sync [<em><PROJECT0></em> <em><PROJECT1></em> <em><PROJECTN></em>] 28 repo sync [<em></PATH/TO/PROJECT0></em> ... <em></PATH/TO/PROJECTN></em>] 29 </code></pre> 30 31 <h2 id="help">help</h2> 32 <p> Repo </p> 33 <pre><code>repo help 34 </code></pre> 35 <p> Repo </p> 36 <pre><code>repo help <em><COMMAND></em> 37 </code></pre> 38 39 <p> Repo <code>init</code> Repo <a href="#init">init</a></p> 40 <pre><code>repo help init 41 </code></pre> 42 43 <h2 id="init">init</h2> 44 <pre><code>$ repo init -u <em><URL></em> [<em><OPTIONS></em>] 45 </code></pre> 46 <p> Repo <code>.repo/</code> Repo Android Git <code>.repo/</code> <code>manifest.xml</code> <code>.repo/manifests/</code> </p> 47 <p></p> 48 <ul> 49 <li> 50 <p><code>-u</code> <code>https://android.googlesource.com/platform/manifest</code> </p> 51 </li> 52 <li> 53 <p><code>-m</code> default.xml</p> 54 </li> 55 <li> 56 <p><code>-b</code></p> 57 </li> 58 </ul> 59 <p class="note"><strong></strong> Repo <code>.repo/</code> </p> 60 <h2 id="sync">sync</h2> 61 <pre><code>repo sync [<em><PROJECT_LIST></em>] 62 </code></pre> 63 <p> <code>repo sync</code></p> 64 <p> <code>repo sync</code> </p> 65 <ul> 66 <li> 67 <p> <code>repo sync</code> <code>git clone</code></p> 68 </li> 69 <li> 70 <p> <code>repo sync</code> </p> 71 <pre><code>git remote update 72 git rebase origin/<em><BRANCH></em> 73 </code></pre> 74 <p> <code><em><BRANCH></em></code> </p> 75 </li> 76 <li> 77 <p> git rebase Git <code>git rebase --continue</code></p> 78 </li> 79 </ul> 80 <p><code>repo sync</code> </p> 81 <p></p> 82 <ul> 83 <li> 84 <p><code>-d</code></p> 85 </li> 86 <li> 87 <p><code>-s</code></p> 88 </li> 89 <li> 90 <p><code>-f</code></p> 91 </li> 92 </ul> 93 <h2 id="upload">upload</h2> 94 <pre><code>repo upload [<em><PROJECT_LIST></em>] 95 </code></pre> 96 <p>Repo repo sync Repo </p> 97 <p> HTTPS Gerrit HTTPS / HTTPS <a href="https://android-review.googlesource.com/new-password"></a></p> 98 <p> Gerrit git rebase -i repo upload</p> 99 <p> repo upload</p> 100 <p> <code>git rebase -i</code> <code>git commit --amend</code> </p> 101 <ul> 102 <li> 103 <p></p> 104 </li> 105 <li> 106 <p> Gerrit ID</p> 107 <pre><code># Replacing from branch foo 108 [ 3021 ] 35f2596c Refactor part of GetUploadableBranches to lookup one specific... 109 [ 2829 ] ec18b4ba Update proto client to support patch set replacments 110 # Insert change numbers in the brackets to add a new patch set. 111 # To create a new change record, leave the brackets empty. 112 </code></pre> 113 </li> 114 </ul> 115 <p></p> 116 <h2 id="diff">diff</h2> 117 <pre><code>repo diff [<em><PROJECT_LIST></em>] 118 </code></pre> 119 <p> <code>git diff</code> </p> 120 <h2 id="download">download</h2> 121 <pre><code>repo download <em><TARGET></em> <em><CHANGE></em> 122 </code></pre> 123 <p></p> 124 <p><a href="https://android-review.googlesource.com/23823"> 23823</a> /</p> 125 <pre><code>$ repo download platform/build 23823 126 </code></pre> 127 <p><code>repo sync</code> <code>repo download</code> <code>git checkout m/master</code></p> 128 <p class="note"><strong></strong> <a href="https://android-review.googlesource.com/">Gerrit</a> <code>repo download</code> </p> 129 <h2 id="forall">forall</h2> 130 <pre><code>repo forall [<em><PROJECT_LIST></em>] -c <em><COMMAND></em> 131 </code></pre> 132 <p> shell <code>repo forall</code> </p> 133 <ul> 134 <li> 135 <p><code>REPO_PROJECT</code> </p> 136 </li> 137 <li> 138 <p><code>REPO_PATH</code> </p> 139 </li> 140 <li> 141 <p><code>REPO_REMOTE</code> </p> 142 </li> 143 <li> 144 <p><code>REPO_LREV</code> Git </p> 145 </li> 146 <li> 147 <p><code>REPO_RREV</code> </p> 148 </li> 149 </ul> 150 <p></p> 151 <ul> 152 <li> 153 <p><code>-c</code> <code>/bin/sh</code> shell </p> 154 </li> 155 <li> 156 <p><code>-p</code> stdinstdout sterr </p> 157 </li> 158 <li> 159 <p><code>-v</code> stderr </p> 160 </li> 161 </ul> 162 <h2 id="prune">prune</h2> 163 <pre><code>repo prune [<em><PROJECT_LIST></em>] 164 </code></pre> 165 <p></p> 166 <h2 id="start">start</h2> 167 <pre><code>repo start <em><BRANCH_NAME></em> [<em><PROJECT_LIST></em>] 168 </code></pre> 169 <p></p> 170 <p><code><em><BRANCH_NAME></em></code> </p> 171 <p><code><em><PROJECT_LIST></em></code> </p> 172 <p class="note"><strong></strong>.</p> 173 <h2 id="status">status</h2> 174 <pre><code>repo status [<em><PROJECT_LIST></em>] 175 </code></pre> 176 <p> (HEAD) </p> 177 <p> <code>repo status</code></p> 178 <p></p> 179 <table> 180 <thead> 181 <tr> 182 <th></th> 183 <th></th> 184 <th></th> 185 </tr> 186 </thead> 187 <tbody> 188 <tr> 189 <td>-</td> 190 <td></td> 191 <td>HEAD </td> 192 </tr> 193 <tr> 194 <td>A</td> 195 <td></td> 196 <td> HEAD </td> 197 </tr> 198 <tr> 199 <td>M</td> 200 <td></td> 201 <td> HEAD </td> 202 </tr> 203 <tr> 204 <td>D</td> 205 <td></td> 206 <td> HEAD </td> 207 </tr> 208 <tr> 209 <td>R</td> 210 <td></td> 211 <td> HEAD </td> 212 </tr> 213 <tr> 214 <td>C</td> 215 <td></td> 216 <td> HEAD </td> 217 </tr> 218 <tr> 219 <td>T</td> 220 <td></td> 221 <td>HEAD </td> 222 </tr> 223 <tr> 224 <td>U</td> 225 <td></td> 226 <td>HEAD </td> 227 </tr> 228 </tbody> 229 </table> 230 <p></p> 231 <table> 232 <thead> 233 <tr> 234 <th></th> 235 <th></th> 236 <th></th> 237 </tr> 238 </thead> 239 <tbody> 240 <tr> 241 <td>-</td> 242 <td>/</td> 243 <td></td> 244 </tr> 245 <tr> 246 <td>m</td> 247 <td></td> 248 <td></td> 249 </tr> 250 <tr> 251 <td>d</td> 252 <td></td> 253 <td></td> 254 </tr> 255 </tbody> 256 </table> 257 258 </body></html>