A ‘pre-commit’ Hook

Learn about the "pre-commit hook."

Create repositories

To understand Git hooks properly, you’re going to create a bare repository with nothing in it and then clone from that bare repo. You looked at bare repositories earlier in this (advanced) part.

1	mkdir lgthw_hooks
2	cd lgthw_hooks
3	mkdir git_origin
4	cd git_origin
5	git init --bare
6	cd ..
7	git clone git_origin git_clone