[TYPO3-dev] [GIT] How to merge branches

Björn Pedersen pedersen at frm2.tum.de
Wed Nov 16 08:46:58 CET 2011


Am 16.11.2011 08:36, schrieb Georg Ringer:
> Good morning,
> 
> got a git question, hopefully someone got the answer too.
> 
> I have 2 branches, master and bemodule and latter is used to implement
> some bigger features. Now I want to have in branch bemodule an updated
> code base of the master.
> 
> So i do now:
> git checkout origin/bemodule -b fo
> git merge origin/master
> 
> Now i have the features of branch bemodule and the latest code of
> master. ==> I want this now in remote branch bemodule too
> 
> git push origin HEAD:refs/heads/bemodule => ERROR: prohibited by gerrit
> git push origin HEAD:refs/for/bemodule => ERROR: not allowed to upload
> merges
> 
> So how do I get this to remote?
> 
> thanks a lot!
> georg
What I normally do in such cases is not merging, but rebasing:

git checkout origin/bemodule -b fo
git rebase -i origin/master

Otherwise, check the gerrit rights. For pushing merges you will need
higher rights (+2 or +3 for push).

Björn




More information about the TYPO3-dev mailing list