Guide: Run Git hooks on commit

Overview

Git hooks are scripts that are located in the ./scripts/githooks directory. They are executed automatically on each commit, provided that the make config command has been run locally to set up the project. These same scripts are also part of the CI/CD pipeline execution. This setup serves as a safety net and helps to ensure consistency.

The pre-commit framework is a powerful tool for managing Git hooks, providing automated hook installation and management capabilities.

Key files

Testing

You can run and test the process by executing the following commands from your terminal. These commands should be run from the top-level directory of the repository:

make githooks-config
make githooks-run