Skip to content

Instantly share code, notes, and snippets.

@alksl
Created September 17, 2014 08:35
Show Gist options
  • Save alksl/f530a7f8bae7662ea40c to your computer and use it in GitHub Desktop.
Save alksl/f530a7f8bae7662ea40c to your computer and use it in GitHub Desktop.
Pre commit hook for checking whitespace

Instructions

Copy pre-commit to .git/hooks/pre-commit

#!/bin/sh
exec git diff --check --cached
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment