$ recombobulate _
home / tips / resolve-git-merge-conflicts-by-pasting-them-into-claude
0

Resolve Git Merge Conflicts by Pasting Them into Claude

bagwaa @bagwaa · Mar 26, 2026 · Workflows
resolve-git-merge-conflicts-by-pasting-them-into-claude

Git merge conflicts are one of those things that slow everyone down — especially when the diff is large or touches unfamiliar code. Claude Code can resolve them for you if you give it the right context.

git merge feature-branch
# CONFLICT in src/services/auth.ts
cat src/services/auth.ts | claude --print "Resolve this merge conflict. Keep both changes where possible, prefer the incoming branch for new features, and preserve existing bug fixes."

You can also resolve conflicts interactively inside a Claude Code session. Just tell Claude about the situation:

I just merged origin/main into my feature branch and got conflicts in 3 files.
Look at each conflicted file, understand both sides, and resolve them intelligently.
Run the tests after to make sure nothing broke.

Claude will read each file, understand the intent behind both sides of the conflict, resolve the markers, and even run your test suite to verify the resolution is sound.

For large merges, point Claude at the PR descriptions or commit messages for extra context:

git log --oneline main..feature-branch | claude --print "Summarise what this branch does"

Stop hand-editing conflict markers — let Claude read both sides and make the smart call.

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
0
Scan Pending Changes for Security Issues with /security-review

The /security-review command scans your uncommitted changes for injection vectors, auth gaps, hardcoded secrets, and other common vulnerabilities.

bagwaa @bagwaa · 1 hour ago
0
Run Setup Scripts on Every Session with the SessionStart Hook

The SessionStart hook fires when any session begins or resumes, making it ideal for loading environment variables and running one-time setup scripts.

bagwaa @bagwaa · 1 hour ago
0
Write Property-Based Tests with fast-check and Claude

Ask Claude to write property-based tests for your functions using fast-check — it identifies the mathematical invariants in your code and generates tests that cover inputs you'd never enumerate by hand.

bagwaa @bagwaa · 2 hours ago