How do you manage git commit messages that need to have Jira issue Id updated after push?

It is not infrequent that after a commit is made in git and subsequently pushed upstream (we use Atlassian Stash), the commit message is realized to contain the incorrect Jira issue Id.

Any documentation I have seen regarding modification of git messages after pushing to a shared repository says simply don't do it. Yet it is common to find commits related to the wrong Jira ticket. With svn, it was fairly trivial to update the relevant commit message - we just notified eveyone to update cached logs. It seems not so easy with git.

So, I am curious whether anyone has found a way to resolve these seemingly conflicting needs: git's need to not change history and Jira's need to change git history to associate commits with the correct issue.

1 answer

1 accepted

One approach would be to remove Jira's dependency on the commit message and maintain the associations between Jira ID and commits outside of git. I have not found any existing solution with this approach but I do have a feature request for it at Atlassian [JRA-33338]. Please vote for it while there.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira Service Desk

Wy are we still using email for Service Desk workflows?

...attest to the experience of an urgent approval that gets lost in the boss’s inbox and requires that special “Please Approve” email or text message. In an age where we have distributed teams...

113 views 0 2
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you