Git/Gerrit Workflow

These are the Git commands I find myself using the most while working on my OPW project, and what they mean. This post is mostly for my reference, so I don’t have to keep looking up the same things in Wikimedia’s Gerrit Tutorial, and in the Git book.

  • Update my local master branch

git pull origin master

This updates my local master branch so that it’s the same as origin (the remote that it was cloned from). Git pull fetches any new commits from the remote, and merges them into the local master branch. The merge involves ”fast-forwarding,” which means the pointer in my local master branch is moved to the latest fetched commit.

First Open Source Contributions!

I’m doing an OPW internship at Wikimedia, and last week my first patches were merged in.

My project is part of Wikimedia’s Parsoid, which translates back and forth between wikitext (the markup language Wikipedia is written in) and HTML. The testing framework translates around 160,000 Wikipedia pages from wikitext to HTML and back to wikitext, and then uses diffs to compare the results with the original articles.

You can see test outcomes here. You may notice that some of the views aren’t very informative, for example the performance stats view. I’m going to make some UI improvements, including data visualizations. I’m starting by using templates to separate out the parts of the code responsible only for presentation.