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.
Log in to leave a comment.
Set up Claude Code as an automated reviewer in your CI pipeline — on every pull request, it reads the diff, checks for bugs, security issues, missing tests, and convention violations, then posts its findings as a PR comment. Your human reviewers get a head start because the obvious issues are already flagged before they look.
Before deploying, tell Claude to read your project — migrations, environment variables, queue workers, scheduled tasks, caching, third-party integrations — and generate a deployment checklist that's specific to your app. Not a generic "did you run migrations?" list, but one that knows YOUR infrastructure and catches the things YOUR deploy can break.
Instead of writing a README from memory or copying a template, tell Claude to read your project and generate one that's actually accurate — real setup instructions from your config, real architecture from your directory structure, real API examples from your routes, and real prerequisites from your dependency files.