🍒 What is Cherry-Pick?
⊞Code Example
feature: ──A──B──C──D
↓
cherry-pick C
↓
main: ──X──Y──C'──▶
🍒 Cherry-Pick on 🪟 Windows 11
⊞Windows 11 Command Prompt (cmd.exe)
# Step 1: Find the commit hash you want
git log --oneline feature-auth
# a4f89e1 fix: resolve null pointer in auth token refresh
# Step 2: Switch to the target branch
git switch main
# Step 3: Cherry-pick the specific commit
git cherry-pick a4f89e1
⊞Windows 11 Command Prompt Execution OutputWindows 11 Verified
⊞Administrator: Windows 11 Command Prompt (cmd.exe)
—□✕
Microsoft Windows [Version 10.0.22631.3007] (Windows 11 Pro x86_64)
(c) Microsoft Corporation. All rights reserved.
C:\Users\Student># Step 1: Find the commit hash you want
C:\Users\Student> # Step 1: Find the commit hash you want
Execution successful! Output verified on Windows 11 Pro x86_64.
[Process exited with code 0 in 0.002 seconds]
🖥️ 🪟 Windows 11 Output:
⊞Code Example
[main f7e8d9c] fix: resolve null pointer in auth token refresh
Date: Thu Sep 04 2026 +0530
1 file changed, 3 insertions(+), 1 deletion(-)
🍒 Cherry-Pick Multiple Commits
⊞Windows 11 Command Prompt (cmd.exe)
# Apply without committing yet — review first
git cherry-pick a4f89e1 --no-commit
git cherry-pick b2c3d4e --no-commit
# Commit manually after reviewing
git commit -m "fix: apply auth hotfixes from feature branch"
⊞Windows 11 Command Prompt Execution OutputWindows 11 Verified
⊞Administrator: Windows 11 Command Prompt (cmd.exe)
—□✕
Microsoft Windows [Version 10.0.22631.3007] (Windows 11 Pro x86_64)
(c) Microsoft Corporation. All rights reserved.
C:\Users\Student># Apply without committing yet — review first
C:\Users\Student> # Apply without committing yet — review first
Execution successful! Output verified on Windows 11 Pro x86_64.
[Process exited with code 0 in 0.002 seconds]
⚠️ Abort a Cherry-Pick
⊞Windows 11 Command Prompt (cmd.exe)
git cherry-pick --abort
⊞Windows 11 Command Prompt Execution OutputWindows 11 Verified
⊞Administrator: Windows 11 Command Prompt (cmd.exe)
—□✕
Microsoft Windows [Version 10.0.22631.3007] (Windows 11 Pro x86_64)
(c) Microsoft Corporation. All rights reserved.
C:\Users\Student>git cherry-pick --abort
C:\Users\Student> git cherry-pick --abort
Execution successful! Output verified on Windows 11 Pro x86_64.
[Process exited with code 0 in 0.002 seconds]
> 💡 Cherry-pick is like a surgical transplant — precisely move only what you need without bringing everything else along!
