[QA] Help setting up Git

S Page spage at wikimedia.org
Tue Aug 5 18:35:09 UTC 2014

On Mon, Aug 4, 2014 at 7:41 AM, Muzammil Rajwadkar <muzzymon at hotmail.com>

> One section where I have felt it doesnt explain much was on the setting up
> git-review page:
> http://www.mediawiki.org/wiki/Gerrit/git-review#Setting_up_git-review

People think they're helping by adding separate pages for individual steps
that duplicate material in the essential Gerrit/Tutorial and which drift
out of date.  Follow the link for the proper explanation.

> It mentions the following sentence: "Gerrit tutorial
> <http://www.mediawiki.org/wiki/Gerrit/Tutorial#Configuring_git-review> recommends
> adding a git-review config file (.gitreview) telling git review to use
> "origin" as its default remote."
That's a garbled version of what the Gerrit tutorial actually says, I
replaced it with a link.

On Mac and Unix git-review has both a per-user configuration, and
per-repository configuration.  Assuming you're only using git-review with
MediaWiki, then you want it to always use "origin", so you specify this
once in a .config/git-review/git-review.conf file in your home directory.
But apparently Windows doesn't have this. (Bluntly, it sucks to run Windows
for much open source development.)

> I found two of these files already on my PC but not sure which file
> location to edit. Would it be either in the: wikimedia\examples or in
> the wikimedia\core section?

This is the second part, per-repository configuration.  Every git
repository for which you upload fixes to gerrit for review needs a
.git-review file, see

> and would the file inside it look like this:
> [gerrit]
> host=gerrit.wikimedia.org
> port=29418
> project=test/mediawiki/extensions/examples.git
> defaultbranch=master
> defaultrebase=0
> defaultremote = origin
> I added in the defaultremote = origin line myself but does that look
> correct?
You can probably add this line to every repository's local .gitreview file
as you are doing, but I'm not sure. The problem these instructions are
trying to solve (having both an "origin" and a "gerrit" remote) is real but
I never found out what circumstances trigger it.

=S Page  Wikimedia Features engineer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wikimedia.org/pipermail/qa/attachments/20140805/67591e0f/attachment.html>

More information about the QA mailing list