Pre-commit hook to remove trailing whitespace #257

ctide opened this Issue Oct 3, 2011 · 3 comments


None yet

2 participants

ctide commented Oct 3, 2011

Add a pre-commit hook to remove trailing whitespace from commits before committing them


do we really need this? I haven't seen much trailing white space any time recently.

@ctide ctide was assigned Nov 29, 2011
ctide commented Dec 2, 2011

Yes, otherwise it keeps coming back and Jer and I keep slowly removing it, but it makes diffs from us a lot more annoying to read.

ctide commented Jan 11, 2012

This has to be done individually on everyone's machine, there's no way to push one out automatically as far as I can tell.

Creating a file 'pre-commit' in the .git/hooks directory under your repo that looks like this:

Will do it.

@ctide ctide closed this Jan 11, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment