title: Why do I get CRLF line breaks in source files, although I'm on a Mac+Linux-only environment with Git and IDEA?
body: <p>My boss and I are the only ones working on our project and we use Macs exclusively for development.  We are doing groovy/grails development, and deploy to Linux servers.  There is no use of MS Windows involved anywhere in our development process whatsoever, yet somehow, when I'm diffing files with git in the bash shell, I end up seeing those stupid <code>^M</code> characters that signify CR (and together with a line feed, CRLF).</p>
  
  <p>This is appearing in files out of nowhere.</p>
  
  <p>I searched online for where to set IntelliJ IDEA to use only LF as line ending but couldn't find it.  The difficulty of googling answers about IDEA has compounded my frustration here.</p>
  
  <p>I want to do these things:</p>
  
  <ol>
  <li><p>Configure git on my machine (OS X) to absolutely <strong>refuse</strong> anything CRLF.  </p></li>
  <li><p>Also, I'm using gitolite as the access layer for our central repository server (which is Ubuntu Linux). If it's possible to enforce refusal of CRLF in gitolite, so much the better.</p></li>
  <li><p>Configure IntelliJ IDEA to never save anything as CRLF.  If possible, even make it so that for existing files full of CRLF, if I add so much as a space and hit save, <strong>all</strong> CRLF are stripped out (converted to single LF).</p></li>
  </ol>
  
  <p>I consider myself to be very proficient with Git generally, but I am horribly confused by all the configuration around CRLF.  Can someone tell me what all of these settings should be for someone in my position?</p>
  
  <p>The main point here is in a purely *nix/LF-line-ending environment I don't want to deal with any CRLF nonsense.  This should be an absolute non-problem, and I hate dealing with it (in case you couldn't tell).</p>
  
  <p>I want CRLF out of my life forever, please.</p>