Git Advanced Cheat Sheet/Cherry-pick a range without committing

Apply commit changes into the index and working tree first.

Section: Specialized Tools

Cherry-pick a range without committing

bash
bash
git cherry-pick -n <start_commit>^..<end_commit>
Explanation

Useful when you want to combine multiple picked commits into one local commit or inspect them before committing.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Specialized Tools
Initialize and update submodules recursively
Populate nested submodules after clone or after config changes.
OpenIn sheetbashsame section
Attach a note to a commit
Add metadata to a commit without rewriting it.
OpenIn sheetbashsame section
Compare two versions of a branch series
Review how a patch series changed across rebases.
OpenIn sheetbashsame section
Interactive rebase last 5 commits
Open the last 5 commits in the interactive rebase todo list.
OpenIn sheetbash2 tag match
Amend last commit without changing message
Replace the most recent commit using the current staged changes.
OpenIn sheetbash2 tag match
Start a bisect session
Begin a binary search to find the commit that introduced a bug.
OpenIn sheetbash2 tag match