Urgent.News

What's breaking now, across thousands of outlets.

Tech

Two Coding Agents Edited the Same File. Make Git Resolve It Once With rerere

Book: AI Agents Pocket Guide Also by me: Thinking in Go (2-book series) — Complete Guide to Go Programming + Hexagonal Architecture in Go My project: Hermes IDE | GitHub — an IDE for developers who ship with Claude Code and other AI coding tools Me: xgabriel.com | GitHub You gave Claude Code the login bug and Codex the auth cleanup. Each one worked on its own branch, and each one finished. Before…

Two coding agents, Claude Code and Codex, independently edited the same file in a GitHub repository. To resolve the conflict, the reporter utilized Git's rerere feature, which stands for "reuse recorded resolution." Rerere records how a conflict was resolved and automatically applies that resolution if the same conflict arises again.

The reporter created two branches, Hermes/fix-login and Hermes/tidy-auth, each containing one of the agent's changes. They then merged both changes into a scratch branch to run the tests together. A guard clause in src/login.js caused a conflict, which the reporter resolved manually by combining both fixes. Rerere was then enabled to automatically apply the resolution when the same conflict occurs again.

The reporter demonstrated the process by merging the first agent's changes into the main branch, rebasing the second agent's branch onto it, and observing Git's rerere functionality in action.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Thursday 15 October →