Jump to: navigation, search

Difference between revisions of "Your first review on Zaqar"

m (Kgriffs moved page Marconi/docs/contrib/tutorials/review to Your First Review (Marconi): Follow mediawiki naming conventions)
(Branches and Commits)
Line 7: Line 7:
  
 
===Branches and Commits===
 
===Branches and Commits===
The [https://wiki.openstack.org/wiki/Gerrit_Workflow#Project_Setup 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.  
+
The [https://wiki.openstack.org/wiki/Gerrit_Workflow#Project_Setup 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
 
<pre>
 
git checkout -b newbranch    #if you already created the branch, omit the -b
 
git commit -a -m "Edited"
 
</pre>
 
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
 
<pre>
 
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
 
</pre>
 
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 [https://wiki.openstack.org/wiki/Gerrit_Workflow#Committing_Changes Gerrit Workflow] page
 
  
 
===Git Review===
 
===Git Review===
 
Once you have all your changes and commits looking nice and pretty, you are ready to submit your patch. Follow [https://wiki.openstack.org/wiki/Gerrit_Workflow#Committing_Changes these instructions] to submit your code for review.
 
Once you have all your changes and commits looking nice and pretty, you are ready to submit your patch. Follow [https://wiki.openstack.org/wiki/Gerrit_Workflow#Committing_Changes these instructions] to submit your code for review.

Revision as of 04:48, 11 May 2014

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.

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.