You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Smart commits allow developers to link Git commits to Jira issues. Using specific syntax in a commit message, developers can leverage smart commits to perform actions in Jira like add a comment to an issue, transition an issue, and more. Ultimately, smart commits help developers avoid context switching between their development tools and Jira, which affords them more time to write code and gives you better visibility into the status of key projects.
Smart Commits Tutorial
Before you can start leveraging the power of smart commits, you’ll need to install Git Integration for Jira. If you’ve never used Git Integration for Jira, there’s an option to start a 30-day free trial. For the integration to work properly, make sure that the email in your Git config matches the email used for your Jira profile.
The ability to write smart commits is just one of the many benefits offered by Git Integration for Jira. This tool makes it easy for developers to drive Jira with Git, eliminate unnecessary context switching, and keep key stakeholders informed on the status of company objectives. Learn more about Git Integration for Jira.
Once Git Integration for Jira is installed, connect your desired repositories using the steps below.
Once you’ve established a connection between Jira and your repository hosting service of choice, you can select the individual repositories you want to connect.
To write a smart commit, begin your commit message with an associated Jira issue key, followed by a `#` and then the command for the action you want to take against the issue.
Basic Smart Commit Syntax Example
<ISSUE_KEY> <ignored text> #<command> <optional command_params>
Smart commits can be used to add comments to a Jira issue directly from a Git commit message. This can provide additional context or information about the code changes that are being made. To do this, developers simply need to include a specific syntax in their commit message that includes the Jira issue number and the comment they want to add.
Add a Comment Example
ISSUE_KEY #comment text
For example, a developer could write a commit message like this: “JIRA-123 #comment this is a test comment.” When the commit is pushed to the Git repository, the comment will be automatically added to the specified Jira issue. This helps streamline the process of tracking and managing issues, making it easier for team members to stay informed and up-to-date on the progress of a project.
Smart commits can also be used to record time tracking information for Jira issues. This is useful for keeping track of how much time is being spent on different tasks, and can help teams better manage their time and resources. To do this, developers simply need to include a specific syntax in their Git commit message that includes the Jira issue number and the amount of time they want to record.
Record Time Tracking Information Example
ISSUE_KEY #time [in Jira time syntax]
*Jira administrators must have enabled this feature for this action to work
For example, a developer could write a commit message like this: “JIRA-123 #time 1h 30m this is a test time entry.” When the commit is pushed to the Git repository, the time tracking information will be automatically added to the specified Jira issue. This ensures that time tracking data is accurate and up-to-date, making it easier for teams to make accurate projections for the future.
Smart commits can also be used to transition Jira issues from one status to another. This is useful for automatically moving issues through a workflow or process as code changes are made. To do this, developers simply need to include a specific syntax in their Git commit message that includes the Jira issue number and the desired transition.
Transition an Issue Example
ISSUE_KEY #jira workflow status
*You must have the necessary Jira permissions to transition an issue for this action to work
For example, a developer could write a commit message like this: “JIRA-123 #in-progress.” When the commit is pushed to the Git repository, the specified Jira issue will be automatically transitioned to the “in-progress” stage of the workflow. This makes it easier for teams to stay organized and informed on the status of various issues in a project.
Smart commits help the individual developer eliminate repetitive tasks like copying over commit message information, thus speeding up their workflow.
Development teams that leverage smart commits are able to keep their commit messages organized and consistent, making it easier to review and understand code changes that have been made.
Ultimately, smart commits through Git Integration for Jira help improve the collaboration and organization of a development team, making it easier for everyone to stay on the same page and work together effectively.
Director of Marketing