FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
rushstack/common/git-hooks/commit-msg.sample at master · chengbapi/rushstack · GitHub
chengbapi
/
rushstack
Public
forked from
microsoft/rushstack
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
rushstack
/
common
/
git-hooks
/
commit-msg.sample
Copy path
More file actions
More file actions
Latest commit
History
History
History
25 lines (24 loc) · 913 Bytes
Breadcrumbs
rushstack
/
common
/
git-hooks
/
commit-msg.sample
Copy path
File metadata and controls
25 lines (24 loc) · 913 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
#!
/bin/sh
#
#
This is an example Git hook for use with Rush. To enable this hook, rename this file
#
to "commit-msg" and then run "rush install", which will copy it from common/git-hooks
#
to the .git/hooks folder.
#
#
TO LEARN MORE ABOUT GIT HOOKS
#
#
The Git documentation is here: https://git-scm.com/docs/githooks
#
Some helpful resources: https://githooks.com
#
#
ABOUT THIS EXAMPLE
#
#
The commit-msg hook is called by "git commit" with one argument, the name of the file
#
that has the commit message. The hook should exit with non-zero status after issuing
#
an appropriate message if it wants to stop the commit. The hook is allowed to edit
#
the commit message file.
#
This example enforces that commit message should contain a minimum amount of
#
description text.
if
[
`
cat
$1
|
wc -w
`
-lt
3 ]
;
then
echo
"
"
echo
"
Invalid commit message: The message must contain at least 3 words.
"
exit
1
fi
Back
|
FazBrowse Home
|
New Git URL