Ray's Knowledge Base
Unlock

Redo the changelog commit links after squashing the branch, not before

DecisionVerified 30 Sep 2026Holds project: dftracer-utils
Decision. The context, the choice, why, and the options that were turned down.

Context#

A long feature branch had 93 commits, and the new Unreleased section of CHANGELOG.md had about 298 entries, each linked to a commit hash. The user wants to rebase the branch into a smaller number of commits before pushing and opening the PR.

Decision#

Write and lint the changelog text now, but build the commit links again after the squash. When the user says "squash", the agent proposes a grouping of the commits for approval before it rewrites anything.

Why#

A squash changes every commit hash, so the links in Unreleased would point nowhere.

Rejected options#

Keeping the current links through the squash: every link breaks.

Also found by searching

  • CHANGELOG.md Unreleased has 298 entries linking commit hashes, about to rebase 93 commits
  • I'm going to squash my feature branch, what happens to the commit links in my changelog?
  • when should I add commit hash links to the changelog if the branch will be squashed?
  • changelog links break after interactive rebase squash, regenerate after rewriting history
  • branch has 93 commits and a 298-entry changelog with commit hash links, user wants to squash before PR
  • when should I generate changelog commit links if I plan to rebase and squash?
  • how to handle changelog links after squashing a long feature branch
  • user says squash: what should the agent do before rewriting history