It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to link old commits which did not have ticket numbers in commit message to JIRA ticket?



We just started using this plugin Git Integration for Jira.

And hence quite a few files were committed without the commit message format of having the JIRA ticket number in commit message.

  1. How can we go back to those old files and link them to appropriate JIRA tickets so that the "Git Commit" tab displays the correct file/commit associations?
  2. If we make a mistake in the initial commit of adding the old JIRA ticket, how do we correct the commit association to the right JIRA ticket?
    1. Note : Subsequent commit messages had the correct JIRA ticket number so the it does appear but initial commit is tied to another JIRA ticket which is kind a confusing..

Can some one please provide some pointers?

Thanks a lot,



4 answers

Hello Rumpa - 

Just following up on our conversation we had via email about evaluating the Git Integration for JIra Cloud add-on.

In the Jira Cloud product we offer the ability to modify the association of the commit with a Jira issue. You can see a video on how to do this here:

On our Jira Server product - we don't (yet) have this feature - but we do index git notes which allows you to add a note to a commit after the fact which could include a new Jira issue key. 

Let me know if you have any additional questions.

- Adam

0 votes
Mikael Sandberg Community Leader Sep 22, 2017

In order to change old git commits you would have to use rebase to get back to the commit you want to change:

git rebase --interactive '<sha-1 commit number>^'

That will start the interactive rebase and it will allow you to edit your commit comment. Once you are done editing, commit your changes:

git commit --all --amend --no-edit

Then continue your rebase:

git rebase --continue

To get back to the HEAD.

Just be careful when you push, the rebase will change the SHA-1 of that commit and it's children, so it rewrites the history in the repository from that point on. Do not use git push --force, that can break your repository.


Thank you Adam for your detailed reply earlier. Your steps helped me relocate and associate the older files manually.

Thanks again,


You can edit Git commit <-> Jira issue association in version 2.16.5 which is now released.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published Apr 03, 2019 in Marketplace Apps

How to estimate projects more accurately?

Gaining insight into your team’s effectiveness and choosing the right estimation technique.   Estimating projects is hard. It is because people have the tendency to underestimate the time thin...

286 views 2 8
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