mirror of
https://github.com/khuedoan/homelab.git
synced 2025-01-07 05:51:17 +07:00
1405fadf1a
Squashed commit of the following: commit 257867f196376df55fa0f57edbdf33967b1da04e Author: Khue Doan <mail@khuedoan.com> Date: Sun Sep 18 16:45:42 2022 +0700 refactor(docs): apply the Diátaxis framework
18 lines
518 B
Markdown
18 lines
518 B
Markdown
# Install pre-commit hooks
|
|
|
|
Git hook scripts are useful for identifying simple issues before commiting changes.
|
|
|
|
Install [pre-commit](https://pre-commit.com/#install) first, one-liner for Arch users:
|
|
|
|
```sh
|
|
sudo pacman -S python-pre-commit
|
|
```
|
|
|
|
Then install git hook scripts:
|
|
|
|
```sh
|
|
make git-hooks
|
|
```
|
|
|
|
If you want to enable pre-commit on all repositories without enabling it manually, see [automatically enabling pre-commit on repositories](https://pre-commit.com/#automatically-enabling-pre-commit-on-repositories).
|