Hacker News new | past | comments | ask | show | jobs | submit login

I've gotten in the habit of adding trailing whitespace when I comment out code or do any printf debugging. It's still quick, but then git yells at me if I try and commit it.



That's an interesting way of dealing with it - I have my text editor strip trailing whitespace and ensure there's a newline at the end of the file on every save, so it wouldn't work for me.

That's okay though. I visually review the diff before I commit (almost) every time.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: