blob: 7a4b6920da7f166d1ba63b14a0028ca2d35682f0 (
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
|
sudo pip uninstall gitlint
virtualenv ~/gitlint-demo
source ~/gitlint-demo
mkdir ~/my-git-repo
git init
echo "test" > myfile.txt
git add .
git commit
WIP: This is a commit message title.
Second line not empty
This body line exceeds the defacto standard length of 80 characters per line in a commit m
essage.
cd ..
asciicinema rec demo.json
------------------------------------
pip install gitlint
# Go to your git repo
cd my-git-repo
# Run gitlint to check for violations in the last commit message
gitlint
# For reference, here you can see that last commit message
git log -1
# You can also install gitlint as a git commit-msg hook
gitlint install-hook
# Let's try it out
echo "This is a test" > foo.txt
git add .
git commit
WIP: Still working on this awesome patchset that will change the world forever!
[Keep commit -> yes]
# You can modify gitlint's behavior by adding a .gitlint file
gitlint generate-config
vim .gitlint
gitlint
# Or specify additional config via the commandline
gitlint --ignore title-trailing-punctuation
# For more info, visit: http://jorisroovers.github.io/gitlint
exit
------------------------------
|