Alex Blewitt explained a Git+Gerrit+Jenkins setup here:
http://www.infoq.com/articles/Gerrit-jenkins-hudson
He sets
$ git config remote.origin.push refs/heads/*:refs/for/*
and can then use
$ git push
instead of the lengthy
$ git push origin HEAD:refs/for/<branch>
(we do not use repo).
I already tried this, but then Git tries to push everything from all branches (and Gerrit rejects it with "duplicate request" IIRC).
Does this only work, when you're just dealing with one single (master) branch? We have several released branches, I wasn't able to push anything successful, when I tried this a week ago.
I know that I must work on a branch with the same name as the target branch to which I want to push.
Thanks for your answer
Kind regards
--
Steffen Gebert
TYPO3 v4 Core Team Member
TYPO3 .... inspiring people to share!
Get involved: http://typo3.org
Hi,
Alex Blewitt explained a Git+Gerrit+Jenkins setup here:
http://www.infoq.com/articles/Gerrit-jenkins-hudson
He sets
$ git config remote.origin.push refs/heads/*:refs/for/*
and can then use
$ git push
instead of the lengthy
$ git push origin HEAD:refs/for/<branch>
(we do not use repo).
I already tried this, but then Git tries to push everything from all branches (and Gerrit rejects it with "duplicate request" IIRC).
Does this only work, when you're just dealing with one single (master) branch? We have several released branches, I wasn't able to push anything successful, when I tried this a week ago.
I know that I must work on a branch with the same name as the target branch to which I want to push.
This only works if you have exactly one local branch. If you have more
than one local branch, yes, Gerrit errors out.
I suggest Matthias' approach (below).
Thanks, Matthias and Shawn!