cd $(git rev-parse --show-toplevel)/.git/hooks/
wget https://gist.githubusercontent.com/gwokae/1e0f9ba24bda731971ea/raw/1a20f57102cc92d12be953c0c6cd156609b11d65/pre-commit
chmod a+x pre-commit
TMP_FILE=/tmp/pre-commit
curl -o $TMP_FILE https://gist.githubusercontent.com/gwokae/1e0f9ba24bda731971ea/raw/1a20f57102cc92d12be953c0c6cd156609b11d65/pre-commit
chmod a+x $TMP_FILE
for dir in $(find . -type d -name .git); do
cp $TMP_FILE $dir/hooks/;
done