Update README.md

This commit is contained in:
Laurent Destailleur 2024-10-27 23:02:45 +01:00 committed by GitHub
parent 1c3f428705
commit 850f1ef143
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -75,14 +75,16 @@ git commit -a -m "My message" --no-verify
```
If you want to skip certain checks for whatever reason, you can set the SKIP
environment variable:
environment variable into the .git/hooks/pre-commit file:
```bash
SKIP=no-commit-to-branch git commit -a -m "My message"
export SKIP=no-commit-to-branch
```
or
You can also switch output to text only, by setting the PRE_COMMIT_COLOR in .git/hooks/pre-commit file:
export SKIP=no-commit-to-branch # In your .bashrc or session.
```bash
export PRE_COMMIT_COLOR=never
```
There is much more you can do with pre-commit, check out its