Ask Your Question

How do I rebase my changes to submit my first changes to OpenStack?

asked 2014-05-23 15:36:57 -0500

nutshi gravatar image

updated 2014-06-03 11:43:21 -0500

smaffulli gravatar image

when i try to submit my tried and tested change ( after running tests i do a git commit and then git review). I see that "git review" take forever .. adn then it returns with some failure stating "i need to fix these conflicts" and when I check the repo using git status ..i see so many files have been changed (which i did not modify) ...can somebody please help me understand what i need to do to submit my changes for review ??

so these are the steps i followed

git branch 

git remote update & git pull  ( i pull the latest code) 

git status ( i verify there are no changes) 

git checkout -b bug1292572  ( i checkout a new branch )

git rebase master

git status 

  modified:   novaclient/v1_1/
  modified:   novaclient/v3/

git commit -a 

git review 

     ***Errors running git rebase -i remotes/gerrit/master
     error: could not apply 7304ed8... Initial commit from fork
     When you have resolved this problem run "git rebase --continue".
     If you would prefer to skip this patch, instead run "git rebase --skip".
     To check out the original branch and stop rebasing run "git rebase --abort".
     Could not apply 7304ed8... Initial commit from fork***

and when i do git status after this stage i see a lot of changes i did not make.

My branch is up to date then what is the reason these changes pop up ?

njain@njain3:/opt/stack/python-novaclient$ git remote -v

    gerrit  ssh:// (fetch)
    gerrit  ssh:// (push)
    origin  git:// (fetch)
    origin  git:// (push)
edit retag flag offensive close merge delete


and yes i have added my ssh key , signed my declaration e.t.c ..all that taken care of ..

nutshi gravatar imagenutshi ( 2014-05-23 15:42:37 -0500 )edit

and i i keep doing git commit -a to all these changes .. it keeps coming back with new and new patches

nutshi gravatar imagenutshi ( 2014-05-23 15:53:02 -0500 )edit

Did you create a new branch before applying your commit?

smaffulli gravatar imagesmaffulli ( 2014-05-23 16:52:05 -0500 )edit

Follow the Gerrit workflow page (specially the 'Normal Workflow' and 'Long lived topic branches') to get going!

unmesh-gurjar gravatar imageunmesh-gurjar ( 2014-05-26 01:19:27 -0500 )edit

Edit your question, add details there and make it readable, with proper formatting. Nesting comments doesn't help people understand where things are going wrong.

smaffulli gravatar imagesmaffulli ( 2014-06-02 15:19:51 -0500 )edit

4 answers

Sort by ยป oldest newest most voted

answered 2014-06-03 11:47:39 -0500

smaffulli gravatar image

Here is what I would do at this point, after having tried so many thing: since you have modified only two files and you only have one branch in your repo, I would clone again the repository from in a different place, follow the Gerrit workflow step by step and try again git commit -a and git review from a clean git repo.

edit flag offensive delete link more


ok i basically removed the whole directory ..clone and started from scratch .. now i am having this new problem

The outstanding commits are:

593ad82 (HEAD, bug1292572) minor 94e4564 corner case checks for aggregate set metadata

Do you really want to submit the above commits? Type 'yes' to confirm, other to cancel: yes remote: Resolving deltas: 100% (12/12) remote: Processing changes: refs: 1, done


remote: ERROR: In commit 94e45645bf56b6fccb214d0d61ddc3c9c216e34e

remote: ERROR: committer email address

remote: ERROR: does not match your user account.

remote: ERROR:

remote: ERROR: The following addresses are currently registered:

remote: ERROR:

remote: ERROR:

remote: ERROR: To register an email address, please visit:

remote: ERROR:



To ssh://

! [remote rejected] HEAD -> refs/publish/master/bug1292572 (invalid committer)

error: failed to push some refs to 'ssh://


nutshi gravatar imagenutshi ( 2014-06-05 12:09:30 -0500 )edit

i have already done git config --global and git config --global

to the correst gerrit user info but still i am getting this ..

its for sure not simple to submit a change in openstack ..

nutshi gravatar imagenutshi ( 2014-06-05 12:11:26 -0500 )edit

i dont understand from where the address is picked up ?

nutshi gravatar imagenutshi ( 2014-06-05 12:11:58 -0500 )edit

This is a different problem than the one before. Would you mind asking a new question so we build a better knowledge base?

smaffulli gravatar imagesmaffulli ( 2014-06-05 12:14:58 -0500 )edit

@nutshi is it possible that you committed your changes before you did git config? Hop on IRC freenode, you may get help there, too.

smaffulli gravatar imagesmaffulli ( 2014-06-05 12:25:41 -0500 )edit

answered 2014-05-26 02:36:52 -0500

chen-li gravatar image

updated 2014-05-26 02:41:54 -0500

Looks like you need to rebase your changes, here is my steps, rebase is done by step 5-8.

  1. git clone $URL (get code, and the default branch name is "master")
  2. git checkout -b $my_branch_name (create my own branch)
  3. edit code under my own branch, and run unit test.
  4. git commit -a (commit change at local)
  5. git checkout master & git remote update & git pull (update master code)
  6. git checkout $my_branch_name
  7. git rebase master
  8. Repeat steps 3 &4 if required.
  9. git review
edit flag offensive delete link more


i tried this .. but i think i am running into the same problem again .. when iu run git review it ..asks me to resolve a bunch of changes that i did not make .. i tried to to "git add" those changes .. but new changes keep [popping up

nutshi gravatar imagenutshi ( 2014-06-02 09:53:11 -0500 )edit

answered 2014-06-05 12:34:48 -0500

nutshi gravatar image

finally i re did everything and was able to submit it !

yay!! my first commit .. i have no idea why i was seeing do much diversion when i was doing git review ..

but when i removed the whole python-novavlient/ dir and cloned it from start and repeated everything else ..then i was finally able to get there

thanks for all your help .. but i have to admit .. i wish it was simpler to submit a change its easy to fix the bug but difficult to work through all the hoops to submit it for review ..

edit flag offensive delete link more


Glad to hear things worked out. We know it's hard but it shouldn't be as hard as you had it. Your journey has started, brace yourself now for the code reviews :)

smaffulli gravatar imagesmaffulli ( 2014-06-05 12:45:39 -0500 )edit

thanks for your help :)

nutshi gravatar imagenutshi ( 2014-06-05 12:49:48 -0500 )edit

answered 2014-06-02 15:31:08 -0500

One possible explanation is that your "origin" remote is stale or otherwise in an odd state, and that's why when you reset to origin/master you're ending up with lots of divergence from what's in the code review system. We actively mirror the python-novaclient Git repository to and so if your origin is one of those, it should be fine. Use 'git remote -v' so see your full list of remote URLs. For example, mine looks like...

$ git remote -v
gerrit  ssh:// (fetch)
gerrit  ssh:// (push)
origin  git:// (fetch)
origin  git:// (push)

If it looks like you may have cloned from an outdated fork somewhere else, try updating it with 'git remote set-url origin <newurl>' and see whether that helps.

edit flag offensive delete link more


njain@njain3:/opt/stack/python-novaclient$ git remote -v

gerrit  ssh:// (fetch)
gerrit  ssh:// (push)
origin  git:// (fetch)
origin  git:// (push)
nutshi gravatar imagenutshi ( 2014-06-03 09:12:12 -0500 )edit

mine looks similar to the output you have pasted here

nutshi gravatar imagenutshi ( 2014-06-03 09:12:39 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-05-23 15:36:57 -0500

Seen: 2,142 times

Last updated: Jun 03 '14