@@ -26,8 +26,11 @@ executable by default.
2626
2727This document describes the currently defined hooks.
2828
29+ HOOKS
30+ -----
31+
2932applypatch-msg
30- --------------
33+ ~~~~~~~~~~~~~~
3134
3235This hook is invoked by 'git-am' script. It takes a single
3336parameter, the name of the file that holds the proposed commit
@@ -43,7 +46,7 @@ The default 'applypatch-msg' hook, when enabled, runs the
4346'commit-msg' hook, if the latter is enabled.
4447
4548pre-applypatch
46- --------------
49+ ~~~~~~~~~~~~~~
4750
4851This hook is invoked by 'git-am'. It takes no parameter, and is
4952invoked after the patch is applied, but before a commit is made.
@@ -58,7 +61,7 @@ The default 'pre-applypatch' hook, when enabled, runs the
5861'pre-commit' hook, if the latter is enabled.
5962
6063post-applypatch
61- ---------------
64+ ~~~~~~~~~~~~~~~
6265
6366This hook is invoked by 'git-am'. It takes no parameter,
6467and is invoked after the patch is applied and a commit is made.
@@ -67,7 +70,7 @@ This hook is meant primarily for notification, and cannot affect
6770the outcome of 'git-am'.
6871
6972pre-commit
70- ----------
73+ ~~~~~~~~~~
7174
7275This hook is invoked by 'git-commit', and can be bypassed
7376with `\--no-verify` option. It takes no parameter, and is
@@ -84,7 +87,7 @@ variable `GIT_EDITOR=:` if the command will not bring up an editor
8487to modify the commit message.
8588
8689prepare-commit-msg
87- ------------------
90+ ~~~~~~~~~~~~~~~~~~
8891
8992This hook is invoked by 'git-commit' right after preparing the
9093default log message, and before the editor is started.
@@ -109,7 +112,7 @@ The sample `prepare-commit-msg` hook that comes with git comments
109112out the `Conflicts:` part of a merge's commit message.
110113
111114commit-msg
112- ----------
115+ ~~~~~~~~~~
113116
114117This hook is invoked by 'git-commit', and can be bypassed
115118with `\--no-verify` option. It takes a single parameter, the
@@ -126,7 +129,7 @@ The default 'commit-msg' hook, when enabled, detects duplicate
126129"Signed-off-by" lines, and aborts the commit if one is found.
127130
128131post-commit
129- -----------
132+ ~~~~~~~~~~~
130133
131134This hook is invoked by 'git-commit'. It takes no
132135parameter, and is invoked after a commit is made.
@@ -135,14 +138,14 @@ This hook is meant primarily for notification, and cannot affect
135138the outcome of 'git-commit'.
136139
137140pre-rebase
138- ----------
141+ ~~~~~~~~~~
139142
140143This hook is called by 'git-rebase' and can be used to prevent a branch
141144from getting rebased.
142145
143146
144147post-checkout
145- -----------
148+ ~~~~~~~~~~~~~
146149
147150This hook is invoked when a 'git-checkout' is run after having updated the
148151worktree. The hook is given three parameters: the ref of the previous HEAD,
@@ -160,7 +163,7 @@ differences from the previous HEAD if different, or set working dir metadata
160163properties.
161164
162165post-merge
163- -----------
166+ ~~~~~~~~~~
164167
165168This hook is invoked by 'git-merge', which happens when a 'git-pull'
166169is done on a local repository. The hook takes a single parameter, a status
@@ -175,7 +178,7 @@ for an example of how to do this.
175178
176179[[pre-receive]]
177180pre-receive
178- -----------
181+ ~~~~~~~~~~~
179182
180183This hook is invoked by 'git-receive-pack' on the remote repository,
181184which happens when a 'git-push' is done on a local repository.
@@ -204,7 +207,7 @@ for the user.
204207
205208[[update]]
206209update
207- ------
210+ ~~~~~~
208211
209212This hook is invoked by 'git-receive-pack' on the remote repository,
210213which happens when a 'git-push' is done on a local repository.
@@ -247,7 +250,7 @@ unannotated tags to be pushed.
247250
248251[[post-receive]]
249252post-receive
250- ------------
253+ ~~~~~~~~~~~~
251254
252255This hook is invoked by 'git-receive-pack' on the remote repository,
253256which happens when a 'git-push' is done on a local repository.
@@ -277,7 +280,7 @@ emails.
277280
278281[[post-update]]
279282post-update
280- -----------
283+ ~~~~~~~~~~~
281284
282285This hook is invoked by 'git-receive-pack' on the remote repository,
283286which happens when a 'git-push' is done on a local repository.
@@ -308,7 +311,7 @@ Both standard output and standard error output are forwarded to
308311for the user.
309312
310313pre-auto-gc
311- -----------
314+ ~~~~~~~~~~~
312315
313316This hook is invoked by 'git-gc --auto'. It takes no parameter, and
314317exiting with non-zero status from this script causes the 'git-gc --auto'
0 commit comments