add instructions for 'git gerrit update'
Change-Id: I1bd5d9b1adff37436d2ab14d7d76ae8fe9020388
Reviewed-on: https://asterix-gerrit.ics.uci.edu/682
Reviewed-by: Ian Maxon <imaxon@apache.org>
diff --git a/content/site.html b/content/site.html
index 370df09..4c13db6 100644
--- a/content/site.html
+++ b/content/site.html
@@ -109,24 +109,37 @@
<p>The website is managed using <code>git</code>. Clone the site as usual</p>
-<pre><code> ➤ git clone https://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site.git
+<pre><code> ➤ git clone -b asf-site https://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site.git
+</code></pre>
+
+<p>and <code>cd</code> into the clone</p>
+
+<pre><code> ➤ cd incubator-asterixdb-site
</code></pre>
<p>You will notice lots of Markdown files and HTML templates in the repository root. The compiled content of the website itself is served from the <code>content/</code> folder in this repository. That is to say, that the actual content of the website itself, as well as its sources are stored in the same repository. Additionally, the main branch on this repository is <code>asf-site</code> and not <code>master</code></p>
<p>Gerrit is used to submit code reviews for the website just as it is with the main codebase. The main difference the site is not strictly subject to code reviews.</p>
-<p>To add the Gerrit repository for this site, add it as a normal git remote:</p>
+<p>Then, you likely will want to check out to make your own topic branch as to not work directly on the “live” branch, like so:</p>
-<pre><code> ➤ git remote add gerrit ssh://YOU@asterix-gerrit.ics.uci.edu:29418/incubator-asterixdb-site
+<pre><code> ➤ git checkout -b YOU/site
+</code></pre>
+
+<p>And perform the git-gerrit init on this branch</p>
+
+<pre><code> ➤ git gerrit init -u ssh://YOU@asterix-gerrit.ics.uci.edu:29418/ -p incubator-asterixdb-site
</code></pre>
<h2 id="making-a-change-to-the-site">Making a change to the site</h2>
-<p>The general overview is as follows:
-- Make edits and check the output of ‘jekyll build’
-- Commit the change and propose it for review
-- Either wait for a review, or submit the change</p>
+<p>The general overview is as follows:</p>
+
+<ul>
+ <li>Make edits and check the output of <code>jekyll build</code></li>
+ <li>Commit the change and propose it for review</li>
+ <li>Either wait for a review, or submit the change</li>
+</ul>
<h3 id="editing-and-viewing-the-change">Editing and viewing the change.</h3>
@@ -137,25 +150,28 @@
<p>This sets up a small integrated web server and compiles the site dynamically as it is edited. Once you are satisfied with how the site looks, go ahead and commit your changes with git.</p>
-<p>Right now git gerrit submit isn’t used for the website, so you must construct the proper commit for Gerrit by hand. In your commit message, be sure to include a Change-Id footer that is unique to your change. You may take previous Change-Id: footers as an example.</p>
-
<p>Once you have made your commit, push it to Gerrit for review:</p>
-<pre><code> ➤ git push gerrit HEAD:refs/for/asf-site
+<pre><code> ➤ git gerrit submit -b asf-site
</code></pre>
-<p>If no Change-Id is provided, “ERROR: missing Change-Id in commit message footer” is returned when attempting to push to Gerrit. The error description also contains a) a proposal for a Change-Id that can be pasted to the commit message and b) instructions how to install a commit-msg hook into the local git repository that will automatically add a Change-Id.</p>
+<p>For longer edits you might need to update your local <code>asf-site</code> mirror, and then merge that onto your working branch. This will prevent your branch from falling too far out of date, and ensure that your code review proposals will merge successfully with <code>master</code>. Similar to the way this is done for code changes you can use</p>
+
+<pre><code> ➤ git gerrit update -b asf-site
+</code></pre>
+
+<p>to do this.</p>
<h3 id="submitting-the-change-to-the-live-site">Submitting the change to the live site</h3>
<p>When the submitted review is committed in Gerrit, pull it and overwrite your current asf-site branch:</p>
-<pre><code> ➤ git pull gerrit
+<pre><code> ➤ git fetch gerrit
</code></pre>
<p>Then, push the exact commit from the Gerrit web interface to the ASF git repository. Do this with care! ASF git doesn’t allow hard resets on branches, so whatever you push here is final.</p>
-<pre><code> ➤ git push origin (SHA1 of submitted commit)
+<pre><code> ➤ git push origin (SHA1 of submitted commit):asf-site
</code></pre>