Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

how to hook sourcetree to Jira


I want that in every commit (not push) I will force the developer to open a JIRA issue.

how can I do it?


I already defined in bit bucket that every push has to be with JIRA prefix. but this is only for push action. if someone forget to add the prefix he needs to amend the commit. but if I have couple of commits this is a problem. 

I want to force JIRA issue opening and not just adding the prefix. can I do it?

2 answers

Hi Eliah,

Welcome to the Atlassian Community.

Since commits in Git are all local actions you would have to create a pre-commit hook that does this for you. You can maintain hooks centrally and share them with your team, see Two Ways to Share Git Hooks with Your Team for example.

0 votes
bgannin Atlassian Team Apr 16, 2019

Hi @Eliah Ninyo,

There isn't a way to do this in Sourcetree's UI currently. I'd recommend using a pre-commit hook to ensure that wherever the user commits from they are checked. You'd want to have the hook's script do a search for the prefix and fail if it's not found, showing a URL for creating one in the error message. Hope that helps.

Brian Ganninger
Principal Developer, Sourcetree

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

5,774 views 4 12
Read article

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