Skip to content
Permalink
Browse files
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>
  • Loading branch information
westmann committed Mar 1, 2016
1 parent d7b4d75 commit 1dba888ae8937da44c9aeb50cb22193ffea17877
Showing 2 changed files with 40 additions and 26 deletions.
@@ -109,24 +109,37 @@ <h3 id="checking-out-the-website-sources">Checking out the website sources</h3>

<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 checkout -b YOU/site
</code></pre>

<p>And perform the git-gerrit init on this branch</p>

<pre><code> ➤ git remote add gerrit ssh://YOU@asterix-gerrit.ics.uci.edu:29418/incubator-asterixdb-site
<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 @@ <h3 id="editing-and-viewing-the-change">Editing and viewing the change.</h3>

<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>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>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>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>


24 site.md
@@ -24,58 +24,56 @@ The website is managed using `git`. Clone the site as usual

➤ git clone -b asf-site https://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site.git

and `cd` into the clone

➤ cd incubator-asterixdb-site

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 `content/` 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 `asf-site` and not `master`

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.


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:


➤ git checkout -b YOU/site

And perform the git-gerrit init on this branch


➤ git gerrit init -u ssh://YOU@asterix-gerrit.ics.uci.edu:29418/ -p incubator-asterixdb-site


## Making a change to the site

The general overview is as follows:
- Make edits and check the output of 'jekyll build'

- 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

### Editing and viewing the change.

For whichever section of the site you want to edit, go ahead and do so with the text editor of your choice. Then, to see what your change looks like, in the repository root, execute:


➤ jekyll serve --watch


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.

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.

Once you have made your commit, push it to Gerrit for review:


➤ git gerrit submit -b asf-site

For longer edits you might need to update your local `asf-site` 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 `master`. Similar to the way this is done for code changes you can use

➤ git gerrit update -b asf-site

to do this.

### Submitting the change to the live site

When the submitted review is committed in Gerrit, pull it and overwrite your current asf-site branch:


➤ git fetch gerrit


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.


➤ git push origin (SHA1 of submitted commit):asf-site


0 comments on commit 1dba888

Please sign in to comment.