How does Jira link to git?
Asked Answered
P

2

9

We are using Jira and have our code in a Git (1.7.4.1) repository. I see that there is a Git plugin for Jira (4.0.1), but I'm not able to figure out from the web site how we can associate a branch or different revisions with Jira tasks. Assuming we install the plugin into Jira, can someone provide some step-by-step instructions for a developer to answer

  1. When we commit code, how do we associate that with a Jira task?
  2. When we create a branch, how do we associate that with a Jira task?
Pungent answered 12/4, 2011 at 16:51 Comment(0)
A
6

For 1, you specify the JIRA issue# in the commit comment.

Amphimixis answered 12/4, 2011 at 18:6 Comment(0)
T
1

for step by step instructions try this: https://confluence.atlassian.com/display/BITBUCKET/Linking+Bitbucket+and+GitHub+accounts+to+JIRA

and for 2. branches are not associated with jira tasks, only commits are..

so supposed you got a jira issue# that has the symbol: JIR-323.. even if you create a branch with the name JIR-323, JIRA (and it's DVCS connector) won't care.. however if you have a randomly named branch name, and you make 100 commits on that branch, and 3 of those commit messages begin with JIR-323, then only those commits will appear in the jira issue page under the commits tab.

in other words.. you can have the same branch having commits displayed under different jira task pages, and by the same token, you can have the same jira task page displaying commits from different branches.

Trademark answered 6/5, 2013 at 13:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.