summaryrefslogtreecommitdiffstats
path: root/man1/git-hook.1
blob: 6ab4317aabd1e6ac1d81a9cf656c2db1fe716f2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
'\" t
.\"     Title: git-hook
.\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\"      Date: 2024-04-30
.\"    Manual: Git Manual
.\"    Source: Git 2.45.0.31.gd4cc1ec35f
.\"  Language: English
.\"
.TH "GIT\-HOOK" "1" "2024\-04\-30" "Git 2\&.45\&.0\&.31\&.gd4cc1ec" "Git Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
git-hook \- Run git hooks
.SH "SYNOPSIS"
.sp
.nf
\fIgit hook\fR run [\-\-ignore\-missing] [\-\-to\-stdin=<path>] <hook\-name> [\-\- <hook\-args>]
.fi
.sp
.SH "DESCRIPTION"
.sp
A command interface for running git hooks (see \fBgithooks\fR(5)), for use by other scripted git commands\&.
.SH "SUBCOMMANDS"
.PP
run
.RS 4
Run the
\fB<hook\-name>\fR
hook\&. See
\fBgithooks\fR(5)
for supported hook names\&.
.sp
Any positional arguments to the hook should be passed after a mandatory
\fB\-\-\fR
(or
\fB\-\-end\-of\-options\fR, see
\fBgitcli\fR(7))\&. See
\fBgithooks\fR(5)
for arguments hooks might expect (if any)\&.
.RE
.SH "OPTIONS"
.PP
\-\-to\-stdin
.RS 4
For "run"; specify a file which will be streamed into the hook\(cqs stdin\&. The hook will receive the entire file from beginning to EOF\&.
.RE
.PP
\-\-ignore\-missing
.RS 4
Ignore any missing hook by quietly returning zero\&. Used for tools that want to do a blind one\-shot run of a hook that may or may not be present\&.
.RE
.SH "SEE ALSO"
.sp
\fBgithooks\fR(5)
.SH "GIT"
.sp
Part of the \fBgit\fR(1) suite