Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [egit-dev] tycho build

Igor Fedorenko <igor@xxxxxxxxxxxxxx> wrote:
> I've tried to add my changes to http://egit.eclipse.org/r/#change,131
> but for whatever reason gerrit ignored Change-Id I provided and created
> new change http://egit.eclipse.org/r/#change,134. Not quite sure if I
> did something wrong or if this is a gerrit bug/feature.
> 
Probably you put another commit on top of http://egit.eclipse.org/r/#change,131 
and pushed that one. If "git log" shows two separate commits that's what happened.

This is explained here : http://gerrit.googlecode.com/svn/documentation/2.0/user-upload.html#push_create
"... Each new commit uploaded by the git push client will be converted into a 
change record on the server."

Instead you should have done
	git add <files you changed>
	git commit --amend 
to update your previous commit with your additional changes and then push 
this updated change to Gerrit.

To fix this you may now squash these two commits using
	git rebase --interactive
This is explained e.g. here 
	http://www.gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html 
Ensure that the squashed change has the ChangeID of http://egit.eclipse.org/r/#change,131
and "git log" now only shows a single commit for your squashed changes.
Then push it to Gerrit, when the result at http://egit.eclipse.org/r/#change,131 
looks ok abandon the other change.

--
Matthias


Back to the top