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 use git hooks with Sourcetree Gitflow?

I am trying to trigger Git Hooks from the use of Sourcetree's embedded GitFlow functionality.

Basically, I am trying to do something very simple: run a git hook that tags the Master branch after a successful merge (using, for example, the "Release" in GitFlow).

The script works and triggers fine if I do the merge manually. However, when using GitFlow "Finish Release", the script never triggers; even though I understand it is doing precisely a merge.

What gives?

1 answer

1 accepted

0 votes
Answer accepted
minnsey Atlassian Team Feb 27, 2019

Hi

Does the hook trigger if you run the Git flow commands from the terminal or command line?

If it does, I would expect Sourcetree to do the same but if it is Git-Flow failing then not.

Perhaps this is of help? https://stackoverflow.com/questions/48524221/git-flow-avh-edition-hooks-are-not-executed

Git-Flow also seems to have its own hook mechanism
https://github.com/petervanderdoes/gitflow-avh/tree/develop/hooks

https://github.com/jaspernbrouwer/git-flow-hooks

You are correct; I would expect running "git flow release finish" to trigger the commit/merge hooks, but they do not. 

 

Git Flow runs on its own hooks, such as:

 

post-flow-hotfix-finish

post-flow-release-finish

pre-flow-release-finish

 

Thanks for the tip.

Suggest an answer

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

Sourcetree for Windows - CVE-2019-11582 - Remote Code Execution vulnerability

A vulnerability has been published today in regards to Sourcetree for Windows.  The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...

4,910 views 0 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