How does Jira link to git?

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?

  • Git branch prompt under Ubuntu not working
  • how to take a backup of untracked files in the git
  • Git: cloning repository into new repository
  • How to create a new git repository with a file that is already in a git repository, keeping the commits
  • Filter lines by pattern in bash script
  • Protocol error when pushing to Heroku from CircleCI
  • How to show git log history for a sub directory of a git repo?
  • CI: One git repository fits it all? Or: gitflow for multiple projects
  • Dropbox > git commit
  • Make shell prompt show current head when in a VCS
  • How do I prevent Eclipse search from looking in the .git directory?
  • Git: How to fetch a single remote branch and create a remote-tracking branch of it automatically?
  • 2 Solutions collect form web for “How does Jira link to git?”

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

    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.

    Git Baby is a git and github fan, let's start git clone.