@@ -31,7 +31,7 @@ to tell Git to run `git hooks trigger <hook-name>` command.
31
31
On trigger the hooks, ` git-hooks ` looks in git configs for list of hooks needed to execute.
32
32
33
33
For example for ` pre-commit ` hooks look like:
34
- ~~~
34
+ ~~~ gitconfig
35
35
[hooks "pre-commit "]
36
36
# Using path to directory, `git-hooks` will execute scripts which name ends to hook name,
37
37
# or all executable files in sub-directory with name `<hook-name>.d`.
@@ -55,7 +55,7 @@ _A relative path is taken as relative to the directory where the hooks are run
55
55
([see more in documentation](https://git-scm.com/docs/githooks# _description))._
56
56
57
57
The two special sections in configs are used by `git-hooks` to look for common hooks for all events:
58
- ~~~
58
+ ~~~gitconfig
59
59
[hooks "pre-trigger "]
60
60
# Trigger these hooks before specific hooks.
61
61
foo = " ~/global-hooks"
@@ -68,7 +68,7 @@ The two special sections in configs are used by `git-hooks` to look for common h
68
68
Keep in mind, The config `core.hooksPath` overrides the Git config and it would not execute
69
69
scripts from `.git/hooks` directory inside your project. If you have hooks in that directory,
70
70
you have to add it config, i.e.
71
- ~~~
71
+ ~~~gitconfig
72
72
[hooks "post-trigger "]
73
73
default = " .git/hooks"
74
74
~~~
@@ -84,14 +84,14 @@ The `git-hooks` respects the config location supported by `git-config`
84
84
([see more in documentation](https://git-scm.com/docs/git-config)).
85
85
86
86
Example how ot install `git-hooks` globally:
87
- ~~~
87
+ ~~~bash
88
88
git hooks install --global
89
89
~~~
90
90
91
91
# # Documentation
92
92
93
93
For more details see `git-hooks` help:
94
- ~~~
94
+ ~~~bash
95
95
git hooks --help
96
96
~~~
97
97
@@ -104,5 +104,7 @@ Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE OF CONDUCT](CODE_OF_CONDUCT
104
104
Thanks to [Benjamin Meyer](https://benjamin-meyer.blogspot.com/2010/06/managing-project-user-and-global-git.html)
105
105
for inspiration.
106
106
107
+ **Enjoy coding ❤️**
108
+
107
109
[ico-license ]: https://img.shields.io/badge/License-BSD%202--Clause-blue.svg?style = for-the-badge
108
110
[link-license ]: LICENSE
0 commit comments