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

Does SourceTree have an interface for git-hooks?

Swift Capital April 8, 2015

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
Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 8, 2015

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

Swift Capital April 9, 2015

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

Like # people like this
Chris H (OG) October 1, 2018

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

GeroHerkenrath October 2, 2018

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.

ChristoKiwi October 2, 2018

@GeroHerkenrath Yup, tried making the hook script executable 👍

Using GIT version: 2.17.1

Chris H (OG) November 5, 2018

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
AUG Leaders

Atlassian Community Events