Jump to: navigation, search

Difference between revisions of "Your first review on Zaqar"

(Common Problems)
(Agreements and Accounts)
Line 5: Line 5:
  
 
===Agreements and Accounts===
 
===Agreements and Accounts===
 +
Folllow the [https://wiki.openstack.org/wiki/Gerrit_Workflow#Account_Setup Account Setup] instructions to get all your accounts in order. You will need a launchpad and and openstack account.
  
 
===Branches and Commits===
 
===Branches and Commits===

Revision as of 15:58, 9 May 2014

Your First Patch

Resources

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 [ http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html this] guide. Fill in the commit message as specified on the Gerrit Workflow page

Git Review