To create a link between your Git commit and a Jira issue, developers must include the issue key into the commit comment.
Right click here to open this video in a new browser tab for more viewing options.
Commits are selected by issue key. Developers should add them to comments every time the commits are made.
For example, the “PRJ-50 fixed issue” comment – this assumes that you have configured a Jira project with the key ‘PRJ’ and someone has created the issue #50 within this project.
Example Git commit message: “TEST-1 Update…”. In this case, “TEST-1” is the issue key linking the commit message to the Jira issue.
Commits that are part of non-master branches will be included only if the master branch doesn't have them.
As a best practice to work with sub-task — put the parent and sub-task Jira issue keys in the commit message so that the commit shows in both places. This way, the commit for the sub-task does not get lost in the many commits of the parent issue.
The maximum commit message length limit is 8,000 characters.
The Git Integration for Jira app supports commits that used the old Jira key in the commit message after a project rename to a new key name (Example: TEST-16 to PROJ-16).
There are two scenarios related to the rename/move:
The Jira project key was renamed and the commit message contains the old key prior to the installation of the Git Integration for Jira app.
The Jira issue was moved from one project to another project and the message contains the old key prior to the installation of the Git Integration for Jira app.
Jira Activity Stream Only the commits that are linked to Jira issues will show on the Jira Activity Stream (not all commits in repositories).