5. Where Hooks Live
PROJECT ROOT
.git
hooks
post-checkout
pre-commit
post-commit
Git-Hook Scripts
are named for the
event or stage at
which they are to
be ran.
why use
6. Why Use Git Hooks?
Polish Up The Workflow
IDE
Takes care of the big things - file encoding, code
quality helps, syntax highlighting...
[GULP] TASKS
Manage building dist files, running checks and tests,
compiling css, concatenation...
GIT HOOKS
Final checks on all (or only modified) files, final
instructions to user...
examples
9. Another Way (A Better Way?)
●
NodeJS -> Can interpret javascript files
●
Gulp -> Easily build tasks for any stage in
the git workflow, likely can reuse existing
tasks
●
No shell scripts!!
What if you could use the same
tools/language you’re already using?
demo