User:Mattflaschen-WMF/Easy git review

From mediawiki.org

Note that every repository is separate. So core, each extension, and each skin all have different git repositories. You need to navigate to the correct directory (e.g. extensions/ExtensionName) before running git commands. The below git commands will only affect one repository at a time.

To update an existing unmerged commit (replace <NUMBERHERE> with the number from the Gerrit URL):

  • Download the change from Gerrit
    • git review -d <NUMBERHERE>
  • Make the changes
  • Amend the commit
    • git commit --amend
  • Upload to Gerrit
    • git review

Starting a new change. Replace <BRANCHNAME> with a branch name that describes what you're working on, e.g. newDialog

  • Update master
    • git checkout master
    • git pull
  • git checkout -b <BRANCHNAME>
  • [Do work]
  • Upload changes
    • git commit/git commit --all
    • git review