I was trying to see if one could avoid commits from feature branches and only have main and release.
When we have commits showing up from feature branches it shows duplicate commits one for main and one for the feature branch.
Yes, but only to a limited extent.
Jira's development panel gets commit information from the connected source-control system (Bitbucket, GitHub, etc.). You generally cannot configure Jira to arbitrarily hide specific commits from a story.
If the concern is duplicate commits from feature branches, the better solution is to control the Git branching/merge strategy—for example, using squash merges—so Jira receives a cleaner commit history.
Hi @AndreH,
I would add one thing: those are usually not the same commit shown twice; they are two different commits. Jira links a commit by the issue key in its message and indexes it by hash. A rebase creates a new commit with the same message, so the feature branch commit and its rewritten copy on main both appear.
That is why squash merges alone will not fix it. The squashed commit on main is still a new object with the key, and the original feature branch commits remain linked.
What works better is keeping the issue key out of the small work-in-progress commits and putting it only in the branch name and the PR or merge commit. The branch name is enough to get the branch and the pull request into the development panel, so you keep traceability without one entry per commit.
Which integration are you using, Bitbucket Cloud, GitHub for Jira, or the DVCS connector?
Servus, Martin
It looks like you're new here. Sign in or register to get started.