git-catchup
v0.1.0
Published
Interactive AI-assisted terminal for reviewing incoming mainline changes and resolving merge conflicts safely.
Downloads
108
Maintainers
Readme
git-catchup
Interactive AI-assisted terminal for understanding incoming main changes, spotting risk early, and resolving merge conflicts with guidance instead of guesswork.
What It Solves
When a developer returns to a long-running branch, three things are usually unclear:
- What changed upstream while I was away?
- Which of those changes overlap with my work?
- What is the safest next step before I merge?
git-catchup answers those questions in one terminal workflow.
Core Features
- Group incoming commits into readable feature clusters
- Detect overlap between local changes and upstream files
- Predict likely conflicts before merge
- Preview risky diffs only
- Apply safe commits first with
--isolate - Launch an interactive AI-guided conflict resolver with
--resolve - Run relevant tests when a supported runner exists
Installation
npm install
npm run buildRun locally:
node dist/index.jsAI Setup
git-catchup auto-loads .env with dotenv.
Example:
OPENAI_API_KEY=your_key_here
OPENAI_MODEL=gpt-4o-miniSupported providers:
OPENAI_API_KEYGEMINI_API_KEYGROQ_API_KEY
AI is optional. Without it, the tool falls back to heuristic commit grouping, conflict prediction, and deterministic resolver guidance.
Commands
Default dashboard:
git-catchupPreview risky diffs:
git-catchup --previewApply only safe incoming commits first:
git-catchup --isolateLaunch the interactive conflict resolver:
git-catchup --resolveRun likely relevant tests:
git-catchup --testInteractive Resolver
git-catchup --resolve handles two cases:
- If a merge is already in progress, it opens the resolver on the real conflicted files
- If no merge is active, it starts a guarded merge against the target branch and opens the resolver only if conflicts occur
Inside the resolver you can:
- move between files and hunks
- ask natural questions like
why is this conflicting? - ask for
suggestto get a merged proposal - use
keep-mine,keep-theirs, orshow-both stagea resolved fileabortthe guarded merge session
Dashboard Example
╭──────────────────────────────────╮
│ Git Catchup │
│ Post-Holiday Merge Assistant │
╰──────────────────────────────────╯
✨ AI enabled • GPT-4o Mini
📍 feature/demo → origin/main • upstream origin/main
📅 14 days of changes | 200 commits on main
────────────────────────────────────
📦 GROUPED BY FEATURE:
├── 🔥 Hot: Notifications (23 commits)
│ └── Changes: src/notifications/notification-worker.ts ← YOUR FILE (conflict likely)
├── 💳 Payments (12 commits)
│ └── Changes: src/payments/payment-flow.ts (safe to pull)
└── 📦 Dependencies (45 commits)
└── Changes: package-lock.json (safe to pull)
⚠️ YOUR LOCAL CHANGES:
src/notifications/notification-worker.ts (modified) → "Incoming overlap: feat: improve notification streaming"
⚠️ CONFLICT RISK:
• src/notifications/notification-worker.ts (high risk)
Multiple incoming commits touch this file, so both your local edits and upstream changes may need manual reconciliation.
🎯 RECOMMENDED ACTIONS:
git-catchup --preview → See full diff before merging
git-catchup --isolate → Pull safe commits first
git-catchup --resolve → Launch AI-guided interactive conflict resolver
git-catchup --test → Run relevant tests automaticallyDevelopment
npm run lint
npm run build
npm testStress Testing
Use the included repeatable stress-test harness to create a dummy project with 20 files, a feature branch 100 commits behind main, 5 active local files, and 3 true merge conflicts:
bash scripts/setup-stress-test.shThe exact runbook and expected observations are documented in STRESS_TEST.md.
