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

In JIRA, "Create Branch" is basically just a link to BitBucket? Is there more to it that I'm missing?

I was excited to see the "Create Branch" functionality in JIRA, but after using it I don't get it. I was assuming this would trigger some sort of integration with BitBucket where commits, etc would be recognized and associated with the issue where I created the branch.

It appears that it's merely a "smart" link that launches BitBucket with a branch name pre-filled and maintans no association with the ticket in JIRA. Is that correct?

I know that I can use smart commits to update the ticket, I guess I was just hoping there was more to it than that.

Am I missing something or is my assessment correct?

11 answers

1 accepted

24 votes
Answer accepted

Yep, +1 for Casey's suggestion. Adding the issue key to every commit message related to an issue is error prone. At the very least, it's something that requires constant reminders to the team to get it done with any consistency. But since we are already using feature branches, if I could simply bind and issue to a branch and immediately see all the commits on that branch, then I could get that information linked to the issue regardless of how the developer had crafted their commit messages.

Thanks Michael, glad I'm not the only one. I was hoping it was tightly integrated like git-flow in Sourcetree, that would be killer. Commit commands are nice but you're exactly right, hard to be consistent with, and forget it if you put the wrong key on accidentally :/

Have developers implement this in their local client to have the JIRA ID extracted from the branch name and added to the commit message automatically.  Could be extended to be any template of commit message content you want.

I agree with Casey, creating a branch from jira should at least link that in some way to the issue, otherwise it has no sense

HI Casey,

At this time for Bitbucket to pick up the commits related to your branch you'll need to be sure to include the issue key in your commit message.

Glad you like the create branch functionality.

Cheers, Justen -- Bitbucket product manager

Thanks for the response Justen, I guess I would say I like the "idea" of the create branch functionality. However its current implementation it's really just a shortcut and not truly integrated with JIRA.

My 2¢ for the feature would be to bind/hook the feature branch to the issue, which would get rid of the necessity of specifying a ticket number in the commit message.

So, if I were to create a branch from an issue, any commits (to that branch) are automatically added to the "Commits" tab in JIRA.

I came across this question because, like Brandon above, I thought I had done something wrong. It doesn't help I get a "Configure BitBucket!" link on the "Source" tab, that then 404s when clicked... Poor showing.

As a developer, I expected to click the "Create branch" link, which would then create a new feature branch (Which I did in the hopes of improving integration and then had to do a bit of work juggling around my local commits) that would then link the issue *to* said-feature branch and all of its commits.

Given the branch is named the same as the issue — and given the whole idea of feature branches is to separate a particular change from the master branch — there's no reason AFAIK why all commits to that branch shouldn't show up in JIRA, regardless of whether the issue key is mentioned.

Anyone know if an issue has been raised about this yet? If not, please let me know and I'll create it. Otherwise, I'll +1 that issue.

The "Create Branch" feature in JIRA is a really great idea, but it is only an idea, it is not a true feature.

The currently functionality in JIRA is hopelessly incomplete and broken:

  1. If you try to create a branch name that is too long, it gets truncated for no good reason. I am clearly able to create longer branch names in BitBucket via SourceTree, therefore the UI in JIRA is defective.
  2. After deleting a branch in BitBucket, there is no way in JIRA to disassociate the branch from JIRA, so you get a permanent dead link.
  3. After creating a new branch via SourceTree, with the longer name I wanted, there seems to be no way to link it back to JIRA. I remember at one time JIRA seemed to automatically link branch names that had JIRA IDs in the name, but either this is broken,or a one time feature when you enable JIRA to BitBucket integration. Or maybe JIRA only responds to branch names with the JIRA ID at the beginning of the name, who knows???

It is really frustrating when companies tease their customers with features that are incomplete and poorly documented. I have just wasted several hours trying to figure out that this feature is a non-feature.

Re. point 1, only the *prefilled* name gets truncated. You can change that to whatever you want. For example, in my team, we always change this to add a prefix, and include the issue code at the very end.

Casey Corcoran is right. 

Currently I'm playing around with Jira+Bitbucket+Bamboo to enhance the workflow. 

I also spend quite some time to figure out what I did wrong. Why my commits are not showing up in my JIRA issue. I only se that one branch was created...that's not a very good implementation.

I would even say it's worse. People get confused about this functionality! You should describe within the configuration of JIRA what this function does and what it not does!


create a new branch for you in bitbucket. It links that branch in your JIRA issue. THAT's IT!



Use this issue-branch link to show all commits of the developer


In a way it does not help the developer. It confuses him. 


How I THINK it should work:


  1. create an issue
  2. assign issue to developer / assign issue to me
  3. create branch with link to issue
  4. develop on branch
    1. checkout branch
    2. commit to branch
    3. build branch
  5. create pull request
  6. merge branch
  7. (set issue as solved)

In my issue I would now see all commits for this issue-branch as well as the build history


Maybe it would also make sense to be able to create a "branch template" name that is created when clicking on "create branch". 

Therefore I could also add automatically  the issue-type to the branch name. That could again trigger different builds in bamboo 






+1000. The presentation on the Jira ticket view really leads one to believe this is integrated as the above posters suggest. If it's just a shortcut link to create a new branch on bitbucket, it should be a button on the ticket instead. Since it gets its own section on the ticket, we're led to believe that we'll see the linked branch on the ticket in the section at the very minimum, and commit messages and history ideally.

Thanks for the response Justen, I guess I would say I like the "idea" of the create branch functionality. However its current implementation it's really just a shortcut and not truly integrated with JIRA.

My 2¢ for the feature would be to bind/hook the feature branch to the issue, which would get rid of the necessity of specifying a ticket number in the commit message.

So, if I were to create a branch from an issue, any commits (to that branch) are automatically added to the "Commits" tab in JIRA.

My 2¢ on this, I think it would be a very weird practice for devs to commit differently depending on the situation. As in, it's become part of our workflow to reference tickets in commits. Having to think if that's necessary in any given commit would be unneccessarily disruptive, imho.

I came across this because I thought that I was doing something wrong in Jira and that was why my branch wasn't linking with my issue. I would love to have Jira link to a branch in bitbucket, so I can open up the issue and see the whole commit history within the issue screen.

So I got here trying to figure out if I could link to a pre-existing repo/branch. My conclusion is that you can't. I'd like to see a link right under "Create branch" for "Link branch".

While I agree somewhat with what the others have said with regard to better integration, referencing issue keys in commit messages isn't unique to this implementation so I don't see that as a biggie. Then again, with that "Create branch" link there it looks like the suggested workflow is to create a new branch for each issue. If you're doing that, then each and every commit to that branch would be related specifically to that it doesn't make sense to require that the issue key appear in the commit.

On the other hand, if the workflow would allow one to point multiple issues to a single branch, then it does make sense to require the issue key because not every commit to that branch will be related to the issue. But for this workflow to be possible, the "Link branch" option (mentioned in para. 1 above) would need to be present. I kind of find this workflow to make more sense but would like to have the option of doing either.

I get it that a lot of devs would rather live exclusively in the CLI rather stray into JIRA too often. But you'd think the easier path for Atlassian would be to offer some level of better integration through SourceTree. Like, why can't we link a repo to a JIRA Projects or Component from within SourceTree? Maybe then you could get a dropdown of issues to select from when crafting a commit message. SourceTree could then insert the key and time spent info at the beginning of the commit message automatically. The info to bind the repo with a project could be just added to a section in git/config for the project. Then you could even get to a SourceTree CLI that would implement support that way. Just an idea.


Edited 10/27/2014: because now I have a way better understanding of how this works. :smile:

The strikethrough comments are incorrect. Once you've setup DVCS integration for a particular repo (under JIRA Administration->Add-ons->Source Control->DVCS Accounts), commits that reference a ticket key will automatically be pulled into JIRA regardless of whether a particular branch was created by clicking on the "Create Branch" link. After the next sync, the Development section will become populated. With this in mind, my preference would be that the "Create Branch" link become more of an icon or toolbar...something less suggestive than what it is now. After all, the link continues to appear even after data begins to appear in the Development section.


Useful discussion, thanks.

I'm just venturing into these water myself. As is often the case the Atlassian documentation is too complete (read "confusing") :-)  

I see that the Atlassian documentation recommends OAuth application links now and cautions against DVCS connectors so I haven't explored Connectors yet.  I can see why OAuth application links might be a bit brittle for feature but it would be nice if the documenttion made that clear in context.

Including ticket numbers in commits has always been a required practice for development projects I've been invovled in.  It's part of being a displined software engineer.

SourceTree is, in the final analysis, just another Git desktop client application that works with any Git repo  regardless of who hosts the github server.  Maintaining issue tracking system-specific state in a Git client would not be small matter. That said, it would certainly be wonderful if someone built that abstraction into a Git Desktop client in a generally configurable away.  

In our case, we are using GitFlow and we can't link at all the branches, I will love to have gitflow support in Jira

Not sure what you mean.  You configure a Branching model for your repo and that drives the create branch dialog where you select the branch type (master, develop, feature, bugfix, hotfix, release) and branchpoint.

That's independent of commits and JIRA tickets. Regardless of which branch you commit to, including the JIRA ticket number in a commit message will update the JIRA issue.

I haven't implemented this yet, but I think Triggers may be the answer. If I understand triggers, when a branch name includes an issue number trigger swill find it an fire.  The default create branch dialog in JIRA adds the issue number to the branch name.  

As long as developers exercise minimal discipline, feature branch names include issue numbers and it's a matter of configuring triggers correctly. 

At least that's the theory ...

In any case, including issue numbers in commit messages is just good, basic software engineering discipline. 

Suggest an answer

Log in or Sign up to answer

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you