Procedure for cherry-picking

Ken Brown kbrown@cornell.edu
Thu Sep 12 16:00:36 GMT 2024


On 9/12/2024 9:20 AM, Jon Turney wrote:
> On 12/09/2024 00:08, Ken Brown wrote:
>> I've been away from Cygwin development for a while, and I've forgotten 
>> (or never knew) the conventional way of cherry-picking a commit from 
>> the main branch to the cygwin-3_5 branch.  Here's the context:
>>
>> Last February it was discovered that a build of Cygwin with -Og failed 
>> because of some gcc warnings that were treated as errors.  Corinna 
>> fixed this on the main branch in commit e99dbf6c25c3.  I just tried to 
>> build the cygwin-3_5 branch without optimization and ran into the same 
>> problem.  So Corinna's fix needs to be applied to that branch.  My 
>> instinct is that I should checkout the branch and do
>>
>>    git cherry-pick e99dbf6c25c3
>>
>> and then amend the commit to add a note that it was cherry-picked.
> 
> If you use 'git cherry-pick -x' it automatically adds a note with the 
> picked-from commit id.
> 
> Otherwise, the procedure you outline makes sense, and is what I do.

Thanks.  I've done this now and pushed it.

Ken


More information about the Cygwin-developers mailing list