git cherry-pick
Mark Millard
marklmi at yahoo.com
Sat May 1 01:37:45 UTC 2021
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?
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.
From 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.
===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)
More information about the freebsd-git
mailing list