Skip to content

sulhadin/cherrypick-interactive

Repository files navigation

🪶 cherrypick-interactive

Cherry-pick missing commits from dev to main — interactively and safely.


🚧 Motivation

When you maintain long-lived branches like dev and main, keeping them in sync can get messy. Sometimes you rebase, sometimes you cherry-pick, sometimes you merge release branches — and every time, it's easy to lose track of which commits actually made it into production.

This CLI solves that pain point:

  • It compares two branches (e.g. origin/dev vs origin/main)
  • Lists commits in dev that are not yet in main
  • Lets you choose which ones to cherry-pick interactively
  • Handles merge conflicts with an interactive resolution wizard
  • Preserves original commit messages perfectly (even with squashed commits)
  • (Optionally) bumps your semantic version, creates a release branch, updates package.json, and opens a GitHub draft PR for review

No manual git log diffing. No risky merges. No guesswork.


📦 Installation

npm install -g cherrypick-interactive

(You can also run it directly without installing globally using npx.)


🚀 Quick Start

cherrypick-interactive

That's it. Compares origin/dev vs origin/main for the last week and lets you pick interactively.

For a full release workflow, see the Quick Start guide.


🧭 What it does

  • 🔍 Finds commits in dev not present in main
  • 🗂️ Lets you select which commits to cherry-pick (or pick all)
  • 🪜 Cherry-picks in the correct order (oldest → newest)
  • ⚔️ Interactive conflict resolution wizard
  • 🎯 Preserves exact commit messages from squashed commits
  • 🪄 Detects semantic version bump from conventional commits
  • 🧩 Creates a release/x.y.z branch from main
  • 🧾 Generates a Markdown changelog with ticket linking
  • 🖥️ Rich TUI dashboard with diff preview, search, and keyboard shortcuts
  • 🤖 CI mode for fully non-interactive pipeline execution
  • ↩️ Undo / rollback with checkpoint-based session recovery
  • 💾 Profiles to save and reuse CLI flag combinations

📖 Documentation

Topic Description
🚀 Quick Start Getting started, full workflow, custom branches
🧩 Common Use Cases Filtering, profiles, CI, tracker, undo, and more
⚙️ All Options Complete reference for all CLI flags
⚔️ Conflict Resolution Per-file and bulk resolution, CI strategies
🧠 Semantic Versioning Conventional commits, version sources, ignore patterns
🖥️ TUI Dashboard Keyboard shortcuts, diff preview, search, fallback
💾 Profiles Save/load/list profiles, config file, CI usage
🔗 Tracker Integration ClickUp, Jira, Linear presets, custom patterns
🤖 CI Mode Exit codes, JSON output, GitHub Actions example
↩️ Undo / Rollback Checkpoint system, safety checks, limitations

🧰 Requirements

  • Node.js ≥ 20
  • Git ≥ 2.0
  • GitHub CLI (gh)Optional, only required if using --push-release

🧑‍💻 Contributing

  1. Clone the repo
  2. Install dependencies: yarn install
  3. Run locally: node cli.js --dry-run
  4. Run tests: yarn test
  5. Follow Conventional Commits for your changes.

🧾 License

MIT — free to use, modify, and distribute.


Created to make release management simpler and safer for teams who value clean Git history, predictable deployments, and efficient conflict resolution.

About

Cherry-pick missing commits from dev to main — interactively and safely.

Topics

Resources

License

Stars

6 stars

Watchers

0 watching

Forks

Contributors