When I rebase a branch and push that branch to bitbucket (using push -f) the number of commits that the Jira shows increments by the total number of commits in the branch. For example assume you have 50 commits, you rebase the branch, then push the newly rebased branch to bitbucket, the number of commits associated with the Jira now shows 100.
This is an example ...
The 3 branches have a total of around 100 commits.
It seems like the commits that have gone away as a result of the rebase are still in a cache somewhere and are contributing to the total number.
Is there a way of asking Jira to recalculate the number of commits based on the active commits, i.e. those that are actually live in branches?
Hi Ergin,
I do not believe there is an easy way to reset such commits. Rebasing re-writes the project history by creating brand new commits for each commit in the original branch, as mentioned in https://www.atlassian.com/git/tutorials/merging-vs-rebasing
Because of the way that Jira references development commits, any commit that contains the Jira issue key either in the title or the message will appear on that Jira issue. So technically Jira is behaving as expected here. In order to affect this change, you would have to somehow change the commits to remove that issuekey from them back on the other branches. I don't know how feasible that would be to do from Bitbucket side of things, but I suspect this is not a trivial change to make.
Andy
In order to affect this change, you would have to somehow change the commits to remove that issuekey from them back on the other branches.
Those commits can't be changed because they don't exist any more in the repository. The only reference to them that remains is in Jira. Jira just would have to remove them from its database. It should already have the information which commits are contained in a branch, it's just a matter of removing those that are no longer in the branch.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Has there been any movement on resolving the rebase issue?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.