Home | History | Annotate | Download | only in source

Lines Matching full:code

27 <p>To work with the Android code, you will need to use both Git and Repo.  In most situations, you can use Git instead of Repo, or mix Repo and Git commands to form complex commands. Using Repo for basic across-network operations will make your work much simpler, however.</p>
39 <p><strong>Gerrit</strong> is a web-based code review system for projects that use git. Gerrit encourages more centralized use of Git by allowing all authorized users to submit changes, which are automatically merged if they pass code review. In addition, Gerrit makes reviewing easier by displaying changes side by side in-browser and enabling inline comments. </p>
48 <p>Use <code>repo start</code> to start a new topic branch.</p>
54 <p>Use <code>git add</code> to stage changes.</p>
57 <p>Use <code>git commit</code> to commit changes.</p>
60 <p>Use <code>repo upload</code> to upload changes to the review server.</p>
69 <pre><code>$ repo sync
70 </code></pre>
72 <pre><code>$ repo sync PROJECT0 PROJECT1 PROJECT2 ...
73 </code></pre>
78 <pre><code>$ repo start BRANCH_NAME
79 </code></pre>
81 <pre><code>$ repo status
82 </code></pre>
85 <pre><code>$ repo start BRANCH_NAME PROJECT
86 </code></pre>
88 <pre><code>$ git checkout BRANCH_NAME
89 </code></pre>
91 <pre><code>$ git branch
92 </code></pre>
94 <pre><code>$ repo branches
95 </code></pre>
97 <p><em>Note: A bug might be causing <code>repo sync</code> to reset the local topic branch. If <code>git branch</code> shows * (no branch) after you run <code>repo sync</code>, then run <code>git checkout</code> again.</em></p>
101 <pre><code>git add
102 </code></pre>
103 <p>which accepts as arguments any files or directories within the project directory. Despite the name, <code>git add</code> does not simply add files to the git repository; it can also be used to stage file modifications and deletions.</p>
106 <pre><code>$ repo status
107 </code></pre>
109 <pre><code>$ repo diff
110 </code></pre>
111 <p>The <code>repo diff</code> command shows every local edit that you have made that would <em>not</em> go into the commit, if you were to commit right now. To see every edit that would go into the commit if you were to commit right now, you need a Git command, <code>git diff</code>. Before running it, be sure you are in the project directory:</p>
112 <pre><code>$ cd ~/WORKING_DIRECTORY/PROJECT
114 </code></pre>
117 <pre><code>git commit
118 </code></pre>
122 <pre><code>repo sync
123 </code></pre>
125 <pre><code>repo upload
126 </code></pre>
127 <p>This will list the changes you have committed and prompt you to select which branches to upload to the review server. If there is only one branch, you will see a simple <code>y/n</code> prompt.</p>
129 <p>If a <code>repo sync</code> shows sync conflicts:</p>
131 <li>View the files that are unmerged (status code = U).</li>
134 <p>Change into the relevant project directory, run <code>git add</code> and <code>git commit</code> for the files in question, and then "rebase" the changes. For example:</p>
135 <pre><code>$ git add .
138 </code></pre>
142 <pre><code>$ repo sync PROJECT0 PROJECT1 ... PROJECTN
143 </code></pre>
148 <pre><code>$ repo sync
149 </code></pre>
151 <pre><code>$ repo prune
152 </code></pre>
155 <pre><code>$ rm -rf WORKING_DIRECTORY
156 </code></pre>