Jump to: navigation, search

Difference between revisions of "Your first review on Zaqar"

m (Your First Patch)
m (Kgriffs moved page Marconi/docs/contrib/tutorials/review to Your First Review (Marconi): Follow mediawiki naming conventions)
(No difference)

Revision as of 22:23, 10 May 2014


The Gerrit Workflow page should be your main resource for how to submit a patch. It covers creating the necessary accounts and signing the necessary agreements required for you to submit your patch. It also covers how you should set up your git environment and what your commit messages should look like.

Agreements and Accounts

Folllow the Account Setup instructions to get all your accounts in order. You will need a launchpad and and openstack account.

Branches and Commits

The Gerrit Workflow page contains all you need to know about setting up your repository for Gerrit. Follow the instructions carefully so you don't miss anything.

Common Problems

1. You realized that you were working in master and you HAVEN'T made any commits. Solution

git checkout -b newbranch     #if you already created the branch, omit the -b
git commit -a -m "Edited"

Now all your changes are in newbranch. Problem solved!

2. You realized that you were working in master and you HAVE made commits to master

git branch newbranch
git reset --hard HEAD~x    #x is the number of commits you have made to master. YOU WILL LOSE ANY UNCOMMITTED WORK
git checkout newbranch

Your commits are now in newbranch. Problem solved!

3. You made multiple commits and realized that Gerrit needs one commit per patch You need to squash your previous commits. Make sure you are in your branch and follow this guide. Fill in the commit message as specified on the Gerrit Workflow page

Git Review

Once you have all your changes and commits looking nice and pretty, you are ready to submit your patch. Follow these instructions to submit your code for review.