Reputation: 430
Is it possible to configure tortoise git master only hook? Is there a way to automate skipping?
My task is to
Upvotes: 1
Views: 279
Reputation: 19025
Put the following at the top of your hook's script:
if [ `git symbolic-ref --short HEAD` != "master" ]
then
exit 0
fi
This will cause the hook to only run on master.
Upvotes: 1
Reputation: 3201
To answer in a word : yes you can. To achieve this you have to modify your hook accordingly.
Please find below steps for achieving this.
Note: exit 0 is used to finish your script normally, if you want your script to stop then use exit 1 as status.
Upvotes: 0