[Development] gerrit : pointers to use it cleverly/efficiently?

Sune Vuorela nospam at pusling.com
Wed Mar 30 09:12:13 CEST 2016


On 2016-03-29, René J.V  Bertin <rjvbertin at gmail.com> wrote:
> Can someone point me in the right direction, maybe to a tutorial of sorts that outlines how to do several code reviews from a single working copy?
>
> I'm not exactly familiar with using branches; I just tried to create one, apply a patch, commit it and then push to gerrit.
> That was a bit of a failure; the commit to my local branch was also applied to the branch I thought I'd branched off, and the push to gerrit was refused:

Yesterday, I created a review for a bug fix. This is more or less my
shell history:

git checkout 3.6 #start from 3.6 branch. qtcreator fix
git checkout -b readonly-reformat # create a branch, reformatting of qml

vim/kate/qtcreator/whatever your sources
make, make test, 

git add ....
git commit
git push origin HEAD:refs/for/3.6
#oops missing change id
git commit --amend #add changeid
git push origin HEAD:refs/for/3.6
#read sanitybot comments
vim/kate/...
git commit --amend 
git push origin HEAD:refs/for/3.6

Add reviewers.

For next change, go to start.
When reviews come in, go back to this branch 

git checkout readonly-reformat
#hack hack hack
git add
git commit --amend
git push origin HEAD:refs/for/3.6

/Sune




More information about the Development mailing list