Using Git Hooks on the 20i Hosting Platform

Ben Gayson
Published: 27 March 2025Last updated: 31 March 2025
Share:

We require a very small change to the config for git hooks to work on the platform.

You can either edit the config file, in .git/config, and add this line inside the [core] section:

hooksPath = /usr/bin/stack-git-hooks

Or, alternatively, run the following command from within your repo:

git config core.hooksPath /usr/bin/stack-git-hooks

Both of the above commands will point your GIT repository to use our hook, to ensure your hooks are executed correctly.

This change has been made as a security measure to ensure that hooks can only be written in languages we support on the platform. 

If you have any questions regarding this, please feel free to contact our support team who will be more than happy to assist further.