Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Apr 2021 18:37:38 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        tech-lists <tech-lists@zyxst.net>
Cc:        freebsd-git@freebsd.org
Subject:   Re: git cherry-pick
Message-ID:  <A9632297-F80A-4FC0-A9BB-484F0EEB8CE9@yahoo.com>
In-Reply-To: <YIyqSef2RKXXOqAa@ceres.zyxst.net>
References:  <YIyqSef2RKXXOqAa@ceres.zyxst.net>

next in thread | previous in thread | raw e-mail | index | archive | help


On 2021-Apr-30, at 18:09, tech-lists <tech-lists at zyxst.net> wrote:

> git newbie here. If one has the full git /usr/src repo, and wants to
> build for stable/13, what are the commands to "cherry-pick" a commit =
from main
> and apply it to (local) stable/13?=20

You may have to provide more description of the end
result's properties that you are after. For example,

Are you intending to have an automatic new commit
for each commit you cherry-pick?

vs. (no automatic new commits but . . .)

Are you intending to have the index already have the
updates to the working directory added?

vs. (no commits, no index additions)

Are you only after the working directory containing
the source changes, no implicit adds of the changes
to the index?

"git cherry-pick" can do the first 2 from what I see
reading the man page. --no-commit (a.k.a. -n) leads
to the 2nd alternative above.

=46rom what I read, the 3rd alternative is not something
that "git cherry-pick" can be told to do. (git's
terminology has a fairly specific span of meanings and
avoiding meaning something outside that span can help
avoid confusions. But it takes a fair amount of reading
to identify the span involved. I learned while reading
for formulate this note.)

If you are intending commits, it seems unlikely that
you would directly use a stable/13 branch and its
HEAD and then commit to it. More likely you would
create a new branch from stable/13's HEAD and then
work with that new branch, including for committing.
Otherwise future stable/13 pull operation are
problematical.

I'm not sure that I'll be of much help, even with the
desired properties specified. But others may be with
the extra information.

=3D=3D=3D
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A9632297-F80A-4FC0-A9BB-484F0EEB8CE9>