Skip to content

Merge Commits leading to Duplicate Changelog Entries #2476

Closed as not planned
Closed as not planned

Description

@yzietz-ionos

Hey guys,

I'm having the issue for some time now, that the release-please app is creating duplicate entries for the same change in case my history contains a merge commit of a feature branch. For example:

commit 903930805b446f7f390845adb356c295392260e1
Merge: 8c9b50d f0735d9
Author: xyz
Date:   Mon Feb 3 15:29:31 2025 +0100

    Merge pull request #178 from BLA/feature/some-feature

    feat: change smth

commit f0735d97ed27f93a50d4323af03f8a0b81210c92 (origin/feature/some-feature, feature/some-feature)
Author: xyz
Date:   Mon Feb 3 15:24:27 2025 +0100

    feat: change smth

leading to

## [1.1.0](https://github.com/BLA/BLUB/compare/v1.0.2...v1.1.0) (2025-02-11)


### Features

* change smth ([9039308](https://github.com/BLA/BLUB/commit/903930805b446f7f390845adb356c295392260e1))
* change smth ([f0735d9](https://github.com/BLA/BLUB/commit/f0735d97ed27f93a50d4323af03f8a0b81210c92))

My unproven assumption is, that #2358 is the cause of that behaviour.

Therefor to my questions:

  1. Can you confirm my assumption or may there be another cause?
  2. Is there a mitigation for that problem other than avoiding merge commits?

Thanks in advance!

Activity

  1. added
    priority: p3Desirable enhancement or fix. May not be included in next release.
    type: questionRequest for information or clarification. Not an issue.
    on Feb 12, 2025
  2. chingor13 commented on Feb 26, 2025

    @chingor13
    Contributor
  3. ringerc commented on Aug 10, 2026

    @ringerc

    Squash merges are ... not lovely. They break some valid workflows in more complex repos.

    Would the team consider a PR to add merge commit awareness?

    Workarounds for this are all undesirable. Either the changelog etc gets duplicate content, or the user has to take special manual action on each merge (error-prone) like adding BEGIN_COMMIT_OVERRIDE text. There doesn't seem to be a sensible way to handle this in github automation.

    I'm thinking of something like a config: merge-commits with options:

    • merge-commit-only - only include the merge commit in the changelog. Recommended for new deployments; retains the git metadata from merges (unlike squash merge) but omits the noise from the changelog.
    • omit-merge-commit - only include the individual non-merge commits. Useful when teams produce well-structured, clean merges.
    • tree-under-merge-commit - show simple merge commits as a tree of unique commits by generating a list of all unique commits added by the merge. Should have a commit count limit to handle special cases like a history that has back-merges off a rebased main (resulting in the whole project history appearing as part of the merge commit).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

priority: p3Desirable enhancement or fix. May not be included in next release.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions