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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
SourceTree Mac 2.7.6 here: `/.git/hooks/` is not working anymore.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@GeroHerkenrath Yup, tried making the hook script executable 👍
Using GIT version: 2.17.1
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.