Skip to main content

Setting up the environment

Win/Mac

For Git CLI, Git Bash, SourceTree, Intellij

Prerequisites:
To set up:
  1. Install Python 3.7 or newer.

  2. Run the following:

    git config core.hooksPath .githooks

Note

All hooks are committed as executable and should work on Windows and Mac.

Eclipse with JGit

core.hooksPath won't work because of this bug. Here are two work-arounds.

Work-around 1:
  1. Copy the pre-commit manually to .git/hooks and make it executable:

    cp .githooks/pre-commit .git/hooks/pre-commit

    Note

    This work-around must be run every time the pre-commit changes.

Work-around 2 (Mac only):
  1. Create a symbolic link:

    ln -s -f .githooks/pre-commit .git/hooks/pre-commit

(Win) Tortoise Git

Git hooks are not supported. Try Git CLI or SourceTree.