Using pre-commit to prevent simple mistakes


There is no level of experience or intelligence where we cease to make mistakes.  The simpler the mistake the harder we kick ourselves. The good news is that the simple mistakes often have  a simple means of ensuring that we do not make the same mistake again.

I saw a Tweet from someone kicking themselves for committing a large file to their git repository.  An easy mistake to make, a bit clunky to fix but very easy to prevent.  This is where the pre-commit tool is useful.

What is the pre-commit tool?

At its most basic it is a tool