An interactive terminal-based Git cherry-pick tool that makes selectively applying commits from a source branch to a target branch intuitive and efficient.
- Dynamic branch selection at startup - Choose source and target branches interactively
- Local branches only - Clean list showing only local branches (no remote duplicates)
- Powerful search functionality - Press
/orfto search through branches - Real-time filtering - Results update as you type each character
- Smart navigation - Use
j/kor arrow keys to navigate filtered results - Graceful cancellation - Press
qto exit cleanly without error messages
Screenshot showing branch selection with search functionality - coming soon
- Identifies commits in the source branch that are not yet in the target branch
- Filters by author to show only your contributions (commits you authored)
- Detects merge commits and already-applied commits with visual indicators
- Shows detailed metadata including date, author, files changed, insertions/deletions
- Cherry-picks selected commits from source branch to target branch
- Individual selection: Use
SpaceorEnterto toggle commit selection - Range selection: Press
rto select multiple consecutive commits - Bulk operations:
ato select all,cto clear all selections - Visual indicators for selected (โ), merge (๐), and already-applied (โ) commits
- Fuzzy search: Press
/orfto search through commits - Search across commit messages, SHA hashes, author names, and changed files
- Real-time filtering with live search results
- Navigate search results with arrow keys
- Press
porTabto enter preview mode - View full commit diffs with syntax highlighting
- See detailed statistics (insertions/deletions by file)
- Examine commit metadata and file changes
- Truncated diff view for large commits
- Source branch switching: Press
Bto change the comparison branch during operation - Target branch switching: Press
bto change the destination branch during operation - Lists available local branches for switching
- Automatically reloads commits when branches change
- Built-in conflict detection during cherry-pick operations
- Interactive conflict resolution interface
- Multiple resolution strategies per file:
- Use "ours" version
- Use "theirs" version
- Open merge tool
- Manual editing
- Visual conflict status indicators
- Cherry-pick mode (
e/x): Standard cherry-pick selected commits - Interactive rebase mode (
i): Launch Git's interactive rebase - Automatic conflict handling with user guidance
- Git (installed and configured)
- Go to Releases
- Download the binary for your platform:
- Linux (x64):
cherry-picker-linux-amd64 - Linux (ARM64):
cherry-picker-linux-arm64 - macOS (Intel):
cherry-picker-darwin-amd64 - macOS (Apple Silicon):
cherry-picker-darwin-arm64 - Windows (x64):
cherry-picker-windows-amd64.exe
- Linux (x64):
Linux/macOS:
# Download (replace with your platform)
curl -L -o cherry-picker https://github.com/zechtz/cherry-picker/releases/latest/download/cherry-picker-linux-amd64
# Make executable
chmod +x cherry-picker
# Move to PATH (optional)
sudo mv cherry-picker /usr/local/bin/
# Or use locally
./cherry-pickerWindows:
# Download using PowerShell
Invoke-WebRequest -Uri "https://github.com/zechtz/cherry-picker/releases/latest/download/cherry-picker-windows-amd64.exe" -OutFile "cherry-picker.exe"
# Run directly
.\cherry-picker.exe
# Or add to PATH and run globally
cherry-picker# Check version
cherry-picker --version
# Or run in any git repository
cd /path/to/your/git/repo
cherry-picker# 1. Navigate to your git repository
cd /path/to/your/project
# 2. Run cherry-picker
cherry-picker
# 3. Select source branch (where commits come from)
# 4. Select target branch (where commits will be applied)
# 5. Choose commits to cherry-pick using Space/Enter
# 6. Press 'e' to execute the cherry-pick# Download checksums file
curl -L -o checksums.txt https://github.com/zechtz/cherry-picker/releases/latest/download/checksums.txt
# Verify your downloaded binary (Linux example)
sha256sum -c checksums.txt --ignore-missing
# Should show: cherry-picker-linux-amd64: OKRequires Go 1.23.0 or later
git clone https://github.com/zechtz/cherry-picker.git
cd cherry-picker
go build -o cherry-picker
# Install globally (optional)
sudo mv cherry-picker /usr/local/bin/# Coming soon...
brew install zechtz/tap/cherry-picker# Coming soon...
choco install cherry-picker# Run in any git repository
cherry-picker
# Start with commits in reverse order
cherry-picker --reverse
# Generate default configuration file
cherry-picker --generate-config- Navigate to any branch (your current branch doesn't matter for commit selection)
- Run
cherry-picker - Select source branch - Choose branch containing commits you want to cherry-pick (e.g.,
dev,main) - Select target branch - Choose destination for cherry-picking (e.g.,
staging) - Tool shows commits from source branch that are NOT in target branch
- Select commits using
SpaceorEnter - Use
/to search for specific commits if needed - Press
eto execute cherry-pick (applies selected commits from source to target) - Handle any conflicts in the resolution interface
| Key | Action |
|---|---|
โ/โ or j/k |
Navigate through branches |
Enter/Space |
Select highlighted branch |
/ or f |
Enter search mode |
q/Ctrl+C |
Quit branch selection |
| Key | Action |
|---|---|
Type |
Filter branches in real-time |
Enter |
Exit search mode (keep filter) |
Esc |
Clear search and exit search mode |
Backspace |
Remove last character from search |
| Key | Action |
|---|---|
โ/โ or j/k |
Move cursor up/down |
Page Up/Down |
Jump by page |
Home/End |
Go to first/last commit |
| Key | Action |
|---|---|
Space/Enter |
Toggle commit selection |
r |
Toggle range selection mode |
a |
Select all commits |
c |
Clear all selections |
| Key | Action |
|---|---|
d |
Toggle detail view |
p/Tab |
Toggle preview mode |
/ or f |
Enter search mode |
R |
Reverse commit order |
| Key | Action |
|---|---|
b |
Switch target branch |
B |
Switch source branch |
| Key | Action |
|---|---|
e/x |
Execute cherry-pick |
i |
Interactive rebase mode |
q/Ctrl+C |
Quit |
| Key | Action |
|---|---|
Type |
Filter commits |
Enter |
Exit search mode |
Esc |
Clear search and exit |
Cherry Picker uses a YAML configuration file located at ~/.cherry-picker.yaml.
cherry-picker --generate-configgit:
# Default target branch for cherry-picking
target_branch: "clean-staging"
# Default source branch to compare against
source_branch: "dev"
# Remote name
remote: "origin"
# Automatically fetch remote before operations
auto_fetch: true
# Branches where the tool should not run
excluded_branches:
- "main"
- "master"
- "production"
ui:
# Cursor blink interval in milliseconds
cursor_blink_interval: 500
# Show commit date in the list
show_commit_date: false
# Show commit author in the list
show_commit_author: false
# Maximum number of commits to display
max_commits: 100
behavior:
# Start in reverse order by default
default_reverse: false
# Require confirmation before executing
require_confirmation: true
# Automatically push after successful cherry-pick
auto_push: falseโโโ main.go # Entry point and CLI flag handling
โโโ models.go # Data structures and core logic
โโโ tui.go # Bubbletea UI implementation
โโโ git.go # Git operations and command execution
โโโ config.go # Configuration management
โโโ app.go # Application setup and initialization
โโโ smart-cherry-pick.sh # Legacy shell script reference
go mod tidy
go build -o cherry-pickergo test ./...- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Charm TUI libraries
- Inspired by the need for better Git cherry-pick workflows
- Thanks to the Go community for excellent tooling
Happy cherry-picking! ๐
