[TYPO3-core] Trying to backport a change to a stable branch with Git/Gerrit

François Suter fsu-lists at cobweb.ch
Mon Mar 14 16:21:56 CET 2011

Hi all,

I'm making my first try at multiple branch submission, but with a patch 
that has already been merged by Gerrit [1]. So I tried the 
cherry-picking way.

1) I switched to the 4-5 branch in my local repository
2) I cherry-picked the change by using the command provided by Gerrit, i.e.

git fetch git://git.typo3.org/TYPO3v4/Core refs/changes/89/1089/2 && git 
cherry-pick FETCH_HEAD

3) I checked my local status by issuing:

git log origin/TYPO3_4-5..HEAD

and it seemed good, meaning that I saw my branch ahead by 1 commit and 
that commit was the one I expected :-)

4) The instructions in the wiki say that the commit should be amended, 
but I didn't see anything to amend, the bug description being the same.

5) I then tried to push the change back to Gerrit for that branch using:

git push origin HEAD:refs/for/TYPO3_4-5

but got the following error:

Counting objects: 9, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 947 bytes, done.
Total 5 (delta 4), reused 0 (delta 0)
To ssh://francois@review.typo3.org:29418/TYPO3v4/Core.git
  ! [remote rejected] HEAD -> refs/for/TYPO3_4-5 (no new changes)
error: failed to push some refs to 

My guess is that because I'm ahead of origin/TYPO3_4-5 by 1 commit, but 
I'm unsure what command should be used in this case to move my master. 
git rebase? Some other git command?



Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch

[1] https://review.typo3.org/#change,1089

More information about the TYPO3-team-core mailing list