[core-workflow] instructions for cherrypicking a change from master

Maciej Szulik soltysh at gmail.com
Fri Oct 7 17:31:34 EDT 2016


On Fri, Oct 7, 2016 at 4:28 AM, Chris Angelico <rosuav at gmail.com> wrote:

> On Fri, Oct 7, 2016 at 1:26 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> > On 7 October 2016 at 11:55, Chris Angelico <rosuav at gmail.com> wrote:
> >> If you want to, you can 'git cherry-pick -x 142a57', which will add a
> >> linking comment to the commit that it creates, saying where it came
> >> from.
> >
> > Recommending the use of referenced cherry picks sounds like a good idea
> to me.
> >
> > It may also be worth linking to
> > https://www.python.org/dev/peps/pep-0512/#commit-multi-
> release-changes-in-bugfix-branch-first
> > from this section of the devguide to help explain why we recommend
> > using the "work on master, cherry pick to maintenance branches"
> > approach.
>
> git checkout master
> git cherry-pick footnote
> git show
>
> Check out the branch you want to cherry-pick into.
> $ git checkout 3.6
> Grab the commit you want
> $ git cherry-pick -x 142a57
> Make sure it looks good, and then push.
>

There's one nit with that cherry-pick, it already creates the commit, and
current
description states you should create a commit after running tests [1].
Although
in my update [2] I decided to go with automatic commit, to leverage -x
option.

[1]
http://cpython-devguide.readthedocs.io/en/github/committing.html#merging-between-different-branches-within-the-same-major-version
[2] https://github.com/python/devguide/pull/57


>
> :)
>
> ChrisA
> _______________________________________________
> core-workflow mailing list
> core-workflow at python.org
> https://mail.python.org/mailman/listinfo/core-workflow
> This list is governed by the PSF Code of Conduct:
> https://www.python.org/psf/codeofconduct
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/core-workflow/attachments/20161007/864eab5d/attachment.html>


More information about the core-workflow mailing list