Skip to content
Snippets Groups Projects
Commit efcd1341 authored by Felix Delattre's avatar Felix Delattre
Browse files

Reviewed wording for pre-commit hook

parent 006428a1
No related branches found
No related tags found
1 merge request!6Review wording for pre-commit hook.
Pipeline #17356 passed
......@@ -27,21 +27,14 @@ Run `make check` for checking code format and `make black` for auto-formatting o
## Auto-run checks
Add a `pre-commit` hook to git to avoid forgetting style checks before committing to git.
Copy the sample inside the git directory of the project:
If you want to be reminded early if continuous integration might trigger an error, you can add
a `pre-commit` hook to git. To do so, please run this command in the main project directory:
```
cp .git/hooks/pre-commit.sample .git/hooks/pre-commit
echo "#!/bin/sh\nmake check" > .git/hooks/pre-commit && chmod +x .git/hooks/pre-commit
```
and add the following content:
```
#!/bin/sh
make check
```
If you want to commit without auto-execution of the pre-commit hook do:
If you want to commit without automatically executing the pre-commit hook, call:
```
git commit --no-verify
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment