User:Dan-nl/Git and Gerrit/Developing for an existing gerrit project

These instructions assume you have already followed the steps mentioned in Setup your Development Environment

Find the extension on gerrit

 * 1) Log into your MediaWiki gerrit account
 * 2) Locate the extension on the gerrit projects page
 * 3) Click on the link to go to the project’s overview page e.g. https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/extensions/UploadWizard

Find the clone url

 * 1) Click on the Branches menu at the left
 * 2) Determine which Branch of the repository you want to work on
 * 3) Click on the link (gitweb) next to the branch name and revision e.g. HEAD master (gitweb)
 * 4) Click on the summary menu
 * 5) Use either of the urls displayed to clone the repository e.g., https://gerrit.wikimedia.org/r/p/mediawiki/extensions/UploadWizard.git

Clone the Repository

 * 1) open a terminal window
 * 2) navigate to the directory where you want to work on the extension, e.g.,
 * 3) clone the repository

Prepare to work with gerrit
From within the cloned repository, run the following command to set it up before you commit your first change for review.

Update master
Make sure that your master branch (the branch created when you initially cloned the repository) is up to date:

Create a branch
First, create a local branch for your new change. Give the branch a short but reasonably descriptive name. If you are working on a bug, include its id, for example "bug/12345" (this will be what git-review sets the commit's topic to anyway).

This will create a new branch (BRANCHNAME) from 'master' and check it out for you. This is equivalent to doing