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

Does SourceTree have an interface for git-hooks?

Not much else to be said. We'd like to work with git-hooks without having to use the command line.

1 answer

1 accepted

2 votes
Answer accepted

There is no option for this in SourceTree. Just copy the hooks into the /.git/hooks/ folder of your clone.

I'm accepting this answer, although I'm also putting in a suggestion for SourceTree.

Like # people like this

SourceTree Mac 2.7.6 here: `/.git/hooks/` is not working anymore.

Just in case, Chris: Are you sure you set the hook script(s) to executable (chmod +x)? I just got here via google because I forgot to do exactly that.

git throws a warning (at least 2.17.1 does) on the console if it sees a script but it isn't set to x, but unless you have the "Command History" shown in SourceTree you won't see that. Was scratching my head for a bit why my very simple pre-commit wasn't called.

@GeroHerkenrath Yup, tried making the hook script executable 👍

Using GIT version: 2.17.1

Oh my.
@GeroHerkenrath I had run chmod +x on the hook file but just now also tried opening up the file with chmod 0755 

Bingo, hook is now picked up.

Thanks for getting me on the right path at least!

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,995 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