Merge or Cherry-Pick?

Boudewijn Rempt boud at valdyas.org
Thu Feb 10 15:40:25 GMT 2011


On Thursday 10 February 2011, Ian Monroe wrote:
> On Thu, Feb 10, 2011 at 04:31, Johannes Sixt <j.sixt at viscovery.net> wrote:
> > Am 2/10/2011 10:40, schrieb Ben Cooksley:
> >> On Thu, Feb 10, 2011 at 9:35 PM, Johannes Sixt <j.sixt at viscovery.net> wrote:
> >>>  git push origin KDE/4.6
> >>
> >> This is wrong, as it would try to push the content of HEAD (the merge
> >> of origin/KDE/4.6 into a checkout of origin/master) into KDE/4.6.
> >
> > Now you made me think about it. But, no, it is correct:
> >
> >  git push remote branch
> >
> > is always a shorthand for
> >
> >  git push remote branch:branch
> >
> > regardless of the push.default configuration setting. Therefore, the
> > command I gave pushes the local KDE/4.6 branch to the remote KDE/4.6
> > branch, regardless what you have checked out.
> 
> Which is why I think these shorthands are just really confusing and
> urge folks to just be explicit in everything. Certainly it isn't
> obvious that git push remote branch doesn't does the same thing
> regardless of what branch you have checked out. But if you did git
> push origin KDE/4.6:KDE/4.6 you know exactly what you are doing.
> 
> But shorthand commands like `git pull --rebase` remain popular, and
> everyone confused.

Amen to that. I don't think I've ever been so confused in my life :-(

-- 
Boudewijn Rempt | http://www.valdyas.org, http://www.krita.org




More information about the kde-core-devel mailing list