Below find walkthroughs for all the major features of the Git Integration for Jira app. We hope these features will bring you some new ideas for making your team even more productive with Jira and Git. If you have any use cases not covered below we would love to add new features for you, please share feedback.
For a quick less than 60 second overview of the app and all its features checkout the video below.
Linking Git Commits to Jira Issues
This tool provides a simple but powerful method for a developer to link their software development work to Jira. Onboarding your developers to this methodology is easy and all you need to do is provide them a link to this page to get started.
In addition to the above video tutorial on linking Git commits to Jira issues, below is a step by step screenshot guide.
Linking Git to a Jira Commit
Assume you have an existing Jira Issue like the one below. Take a note of the issue key as highlighted below:
Map the commit to Jira
Mapping is easy. Just include the Jira Key in the Commit. In the example below I map a specific commit to the Jira issue BW-32 $ git add docs/*
$ git commit -m “BW-32 This is my commit message”
After you make this commit you can view code commit details within the Jira issue.
Linking a commit via the repo explorer
There is also a possibility to link a commit to a Jira issue via the repo explorer. Simply find the commit and click on the "Actions" button.
In the pop-up window, you can add issues and also assign a user.
Bitband’s Git tool also provides some powerful Smart Commits. They include:
Commenting an Issue
Assigning an Issue
Transitioning an Issue
Commenting an Issue
Use the #comment command to add comments to Jira issue.
$ git commit -m “BW-32 #comment Hello”
Use the #time command to record time against a Jira issue.
$ git commit -m “BW-32 #time 1w:1d:2h Total work logged”
Your development team regularly tracks their time in the Jira work log and you are looking for a quicker and more consist way to log time. You'd like to log time directly from the git command line right where the developers are working while in their flow.
To track time in Jira from Git open your repository page or git command line. For example, if you are working in GitHub:
Create a new commit by using a special command to track time: TES-1 #time 1w:1d:2h Total work logged
Enter your projects name, ticket and time. Click the “Commit new file” button.
This new commit is automatically matched and shown in the Git Integration.
Also the work log time is automatically added to ticket.
You can also see the information about this commit in the Git Integration > Repo Browser > Commits section:
Assigning an Issue
Use the #assign command to assign a particular issue to a specified Jira user. Example of assigning an issue to a specific Jira user called jbailey.
$ git commit -m “BW-32 #assign jbailey”
After your developers complete code updates they need to assign the Jira issue to a dev team lead, QA, product, or someone else to review their work or take the next desired step. You'd like the dev team to do these assignments more easily and consistantly right from the git command line when doing commits.
To assign a Jira issue open your repository page or git command line. For example, if you are working in GitHub:
Create a new commit by using a special command for assign: TES-1 #assign testfresh
Enter your projects name, ticket and assignee. Click the “Commit new file” button.
This commit is matched and shown automatically in the Git Integration.
And the assignee is changed automatically in the ticket.
You can also see information about the commit in Git Integration > Repo Browser > Commits
Transitioning an Issue
Use the #transition command to move the Jira issue to a particular workflow state. For example to move the issue BW-32 to state “closed” use the following command.
$ git commit -m “BW-32 #transition closed”
The repository browser allows you to view and compare commits from all of your repos across all of your git service providers right inside Jira.
The functionality of repo explorer includes the ability to compare branches/tags and see all commits, diff, and issues for the comparison set.
Assuming you have already created some branches, pull requests, and commits in your repository, you can use the Repo Browser to view them. Click on the “Repo Explorer” section as on the screenshot above. You'll see all available repositories. Click on the repository, for example, from GitHub.
You'll see all commits as on the screenshot above. Then you can select values and compare branches/tags and also see all commits, diff, and issues for the comparison set.
You can also manually add, edit, and remove Jira IDs that are associated with certain commits. Just select issue from the dropdown list.
Adding New Git Repositories
Compare Git Commits
You'd like to better understand what changes have been made to your applciation code that relate to a specific Jira issue. You would like to see git diffs from inside Jira to quickly compare any two commits that are relevant to a specific Jira issue. This helps you review code, spot potential problems, and better understand the work the developer completed.
Create a ticket on your board in Jira Software.
Open your repository page in your Git tool or git command line. For example, if you are working in GitHub:
Create two different commits, for example, assign and work log.
TES-1 #assign testerfresh
TES-1 #time 1w:1d:2h Total work logged
Enter your projects name, ticket, assignee and time.
4) Open the ticket on a board and click the “Git” button. Then click the “Compare commits” button.
Select data in all fields and click the “Compare” button.
You will see data about commits after comparing.
Creating New Branch
As your team builds stories, epics, and issues inside Jira, you'd like to create new feature branches from inside Jira, giving the product or a dev team lead more control over the dev teams workflow. You would also like to have quick access to the branch from inside Jira.
Create a ticket on your board in the Jira Software.
In the Git Integration for Jira Software make a connection with your repository with the git service provider you are using. For example, you could be working with a GitLab repository. Use any command, for example: TES-1 #time 1w:1d:2h Total work logged
Enter your projects name, ticket and time.
Go to the Git Integration for Jira Software. Commit is matched.
Click the “New Branch” button on your repository.
Select data in all fields and click the “Create branch” button.
Now a new branch is created.
Creating Pull Requests
You can create new pull requests just right in Jira Git too. Click the “New Pull Request” icon nearby enabled repository.
The repository name is already chosen. Select the “Source branch” from the drop-down. Select the “Target branch” and the “Issue”.
Click the “Create pull request” button. If everything is correct, the new pull request will be created.
Creating Release Tags
Tags can be created in the GitHub, GitLab or Bitbucket account by clicking the “Draft a new release” button in the repository in GitHub, the “New tag” button in Gitlab and the “Create tag” button in Bitbucket.
Important to know that tags will shown in your ticket only if you’ll tie tag with ticket while creating commands.
You could check tags in the ticket while clicking the “Open Jita Git” and scrolling down to the “Tags”.
Viewing Git Commits
Git commits are available for a project and for a specific issue.
To view a Project Commit navigate to the project our repository configuration page by the following steps:
Choose -> Project -> Jira Git Integration
All commits related to this project are shown here:
To view, an Issue Commit navigate to the Jira issue and click on the Git tab located as shown below.
Clicking on Git will display all the commits created for a specific issue. This example shows the bottom of the page for Jira issue RING-1, showing all the commits with RING-1 in the commit comment.
The Team Insights page can be accessed from the configuration page with the button on the top right corner.
This allows managers to check their software team's productivity visually. Commits and pull requests are visually represented on a calendar to track team’s performance and productivity.
Prerequisites for this functionality are that you have a Git service connected, at least one repository indexed and you have connected a Git commit to a Jira issue. Once set up, you can filter the data by user and/or by project.
You can also toggle between weekly and monthly calendars for a better overview.
If you notice any problems with matching projects, commits or issues in the Git Integration app, you can choose to Re-Sync your data.
First, you need to click the Re-Sync button. After this, you need to disable, then enable the repository.