hn.today

Keep the changelog, avoid the conflicts

devenv.sh9 points4 comments
Screenshot of Keep the changelog, avoid the conflicts

As more people and coding agents make changes in parallel, unrelated pull requests can edit the same top lines of a shared changelog. Git may then report a conflict even though both entries belong in the release notes. The changelog-merge tool addresses this for files following the Keep a Changelog format: it recognizes releases, categories, and entries, and can combine independent additions while preserving both. It is designed to reduce repetitive conflict resolution, not to decide between genuinely competing edits.

Projects using devenv can enable the integration in devenv.nix; Git will then use the tool for CHANGELOG.md during merges. A different changelog path can be registered through Git attributes, and committing the devenv configuration lets contributors share the setup. Projects without devenv can install the Rust-based tool with Cargo, validate a changelog, add a merge attribute, and configure Git’s merge driver locally. Once configured, the driver applies during merges, rebases, and cherry-picks. The repository can commit the attribute, but each contributor must install the executable and configure their own Git clone. If branches rewrite the same entry incompatibly, or the tool cannot confidently match changes, it leaves conflict markers for a person to resolve.

Read on devenv.sh4 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.