How to cherry pick?

For discussion of ports to POSIX based systems, especially using GNUStep.

Moderators: another_commander, winston, Getafix

Post Reply
User avatar
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 747
Joined: Sun Jun 20, 2010 6:00 pm

How to cherry pick?

Post by mcarans »

I have closed my PR (https://github.com/OoliteProject/oolite/pull/564) to bring changes from 1.92-maintenance due to the strong resistance to just copying over the changes.

I would like someone to explain clearly how to cherry pick as I am unfamiliar. Linking articles is not useful. What I need is an outline of the whole process with respect to our 1.92-maintenance branch as well as a step by step example with one of the commits on 1.92-maintenance showing all the git commands required to bring that commit into master and any gotchas to look out for.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 7196
Joined: Wed Feb 28, 2007 7:54 am

Re: How to cherry pick?

Post by another_commander »

I would like to know this information too. And I think it would be so much simpler if the PR was just accepted.

Standing by. @mcarans, if no information is provided in a reasonable time, please consider reopening the PR.
User avatar
hiran
Theorethicist
Posts: 2610
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: How to cherry pick?

Post by hiran »

I am happy to not have experience in cherry picking.

Looking at the fact that mcarans is the only one doing changes at this time I think a merge should be considered.

However I wanted to make a point that future PRs schould have one purpose each so they are difestable for reviewers.
Sunshine - Moonlight - Good Times - Oolite
User avatar
Lone_Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 815
Joined: Wed Aug 08, 2007 10:59 pm
Location: Netherlands

Re: How to cherry pick?

Post by Lone_Wolf »

First off : I have no personal experience with cherry-pick .

Yesterday I entered "git how to port multiple commits from one branch to another" into DDG and every result was about cherry-pick .
I do know that archlinux & mesa devs use cherry-picking so I felt mentioning it in the PR as an option was a good idea.

I am willing to spend time on figuring out how to use this and think I can create sort of a Proof of Concept by following these steps

track all commands used
Clone oolite to my workstation
Lookup the first PRs that added commits to 1.92-maintenance
git cherry-pick those commits to master
push the new version to a new sourcehut repo so others can see what has happened
post the commands used
repeat with a 2nd PR
OS : Arch Linux 64-bit - rolling release

From: The Netherlands, Europe

OXPs : My user page (needs updating)

Retired, occasionally active
User avatar
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 747
Joined: Sun Jun 20, 2010 6:00 pm

Re: How to cherry pick?

Post by mcarans »

Lone_Wolf wrote: Sun Mar 22, 2026 12:36 pm
First off : I have no personal experience with cherry-pick .

Yesterday I entered "git how to port multiple commits from one branch to another" into DDG and every result was about cherry-pick .
I do know that archlinux & mesa devs use cherry-picking so I felt mentioning it in the PR as an option was a good idea.

I am willing to spend time on figuring out how to use this and think I can create sort of a Proof of Concept by following these steps

track all commands used
Clone oolite to my workstation
Lookup the first PRs that added commits to 1.92-maintenance
git cherry-pick those commits to master
push the new version to a new sourcehut repo so others can see what has happened
post the commands used
repeat with a 2nd PR
Great! As you investigate, please can you find out about the following questions (I often find that the devil is in the details):
  1. Environment: Does cherry-picking need to be done on a clone of the original OoliteProject/oolite repo, or can it be done on a fork followed by a PR?
  2. Target Branch: What branch do we start in: master or 1.92-maintenance?
  3. Batching: Is it possible to specify a commit range, or must cherry-picking be done one commit at a time?
  4. Conflict Resolution: I'm interested in how conflict resolution works. Please pick commits that touch both Obj-C .m files and shell .sh scripts. The former may give conflicts.
  5. Workflow Order: For each cherry-pick (assuming more than one), what is the order?
    1. Cherry-pick 1, ..., cherry-pick N, resolve all conflicts, commit, push.
    2. Cherry-pick 1, resolve conflicts 1, ..., cherry-pick N, resolve conflicts N, commit, push.
    3. Cherry-pick 1, resolve conflicts 1, commit 1, ..., cherry-pick N, resolve conflicts N, commit N, push.
    4. Some other order.
  6. Verification: What do we expect to see in the commit history at the end of the process so we know it has been done correctly?
Post Reply