git diff and white space

So I’m getting ready to make a commit to wxperl and I run a

git diff

to check on changes and git yelled at me that I had some trailing white space. Well it didn’t yell but it hi-lighted the white space in red. Way awesome!

git-diff-trailing-white-space

This entry was posted in General and tagged , . Bookmark the permalink.

2 Responses to git diff and white space

  1. yonkeltron says:

    Just so you know, emacs has M-x nuke-trailing-whitespace which will greatly clean up your files when needed. It’s handy for most types of files and I use it regularly for code, LaTeX, XML and things that I tend to heavily edit over a period of time.

    Still, awesome little find there!

    • mikegrb says:

      Yeah, I generally use TextMate for coding which has the same. Did some quick edits in vim remotely this time. I’m sure vim has a built in command or a global s/// would have taken care of it but I didn’t think I had added excess white space in my quick little edit ;)

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>