User:TCipriani (WMF)/Gerrit/Changes

🧑🏽‍💻 Gerrit for Product Analytics


Uploading changes

You need to change a patch you've sent to Gerrit (your patchset)

# 1️⃣ Step 1: Fetch your patch

Navigate to your local copy of the repository (see the tutorial if you don't have a local copy).

Next, download the patch you want to work on from Gerrit.

  1. Navigate to your local copy of the repo
  2. Get your local copy even with the mainline branch, or make a fresh copy
  3. Go to gerrit url (example)
  4. Click the three vertical dots on the upper-right, then click: Download Patch
  5. Copy the command for Cherry Pick
  6. Paste the command in your terminal

three dots Gerrit download patch – Cherry pick

Git Cherry Pick

# 2️⃣ Step 2: Make changes

Make the changes to your files and save.

# 3️⃣ Step 3: Commit your changes

Below I run three commands:

  • git add
  • git commit --amend --no-edit
‼️ it's important to use git commit --amend. If you miss --amend you will make two commits and two patchsets
Make changes

# 4️⃣ Step 4: Push your changes back to gerrit

git review -R