[git-users] Why am I getting You have more than one commit that you are about to submit. ?

2014-10-31 Thread Kevin Wilson
After doing git pull and getting merge patches, and then trying
to add my changes, prepare a patch, commit it and run git-review -f
master (I am
working with gerrit), I am getting this message:

git-review --dry-run -f master
You have more than one commit that you are about to submit.
The outstanding commits are:

995f903 (HEAD, remove_my_module_parameter) test
0869068 (master) Merge branch 'master' of ssh://zzz.xxx.com:29418/devbranch
733edbc add remove_my_module_parameter in my module

Is this really what you meant to do?
Type 'yes' to confirm:

Why am I getting You have more than one commit that you are about to submit. ?
Is there a way to avoid it ?


Regards,
Kevin

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] Why am I getting You have more than one commit that you are about to submit. ?

2014-10-31 Thread Sam Roberts
I don't know anything about gerrit, but it looks like you did a git
pull when you should have done a 'git pull --rebase'. git pull
defaults to merging from the origin branch, that is your middle commit
0869, and that is almost always wrong.

rebase your branch onto master: git rebase origin/master

(assuming your remote is called origin, the default)

At that point you should have two commits, not three.

It looks like you have two commits, one adds a parameter, one adds a
test. Do you want that? Generally, you would submit a feature and test
for the feature in the same commit... do this with 'git rebase -i
origin/master' (you might need to google to get a tutorial)

Cheers,
Sam

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.