Skip to content
This repository

Pre-commit hook to remove trailing whitespace #257

Closed
ctide opened this Issue October 03, 2011 · 3 comments

2 participants

Chris Burkhart Simon Murtha Smith
Chris Burkhart
Collaborator

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

Simon Murtha Smith
Owner

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

Chris Burkhart
Collaborator

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.

Chris Burkhart ctide closed this January 11, 2012
Chris Burkhart
Collaborator

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:

http://snipplr.com/view.php?codeview&id=28523

Will do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.