Resolve issues automatically when users push code

This page is about transitioning issues in the Bitbucket Cloud issue tracker. If you have Bitbucket Cloud integrated with Jira, then you can use Smart Commits instead.

Bitbucket Cloud can resolve Bitbucket Cloud tickets automatically when people push updates to your Bitbucket Cloud repository.  They can specify commands and issues in commit messages, like this:

git commit -m "fixes #6, resolve ticket #5 and see ticket #9 and ticket #5 in the tracker"

Including Issues in a Commit Message

To link commit to an issue from a commit message, include an command-issue pair somewhere in your commit message. This pair takes the following format:

1 <command> <issue id>

You can link to a single issue or multiple issues.  The <issue id> can take any of the following forms:

1 2 3 4 #4711 issue #4711 bug #4711 ticket #4711

You should always include the # (pound sign or hash mark) if you want to ensure that links back to the issue resolve.  If you omit the # (pound sign or hash mark), links from a changeset do not resolve.

Each action supports multiple <command> keywords. The following table lists the actions you can perform through a commit and the acceptable commands for that action.  All the keywords are case insensitive. So, for example, both close and Close work to close an issue.


Command Keyword


resolve an issue

  • close

  • closes

  • closed

  • closing

  • fix

  • fixed

  • fixes

  • fixing

  • resolve

  • resolves

  • resolved

  • resolving

1 close #845
1 fix bug #89
1 fixes issue #746
1 resolving #3117

reopen an issue

  • reopen

  • reopens

  • reopening

1 reopen #746
1 reopening #78

mark an issue on hold

  • hold

  • holds

  • holding

1 holds #123

mark an issue wontfix

  • wontfix

1 wontfix #12

mark an issue invalid

  • invalidate

  • invalidates

  • invalidated

  • invalidating

1 invalidates #45

link to a changeset for the issue

  • addresses

  • re

  • references

  • ref

  • refs

  • see

1 re bug #55
1 see #34 and #456


Additional Help