title: prevent git checkout from overwriting a file
body: <p>Another dev checked his .rvmrc into the git repo.  I've since removed it and added it to gitignore, but every time in need to go back in time it overwrites my .rvmrc.  I'm on OSX, so I've discovered I can use the OSX file locking mechanism ("Locked" checkbox in Get Info) to stop this happening on my dev machine, but how would this be done on Linux?</p>
  
  <p>I chown'd it to root and chmod'd it to 444, yet git (run as my normal user), somehow transcends the need for ownership &amp; permission and still overwrites the file.</p>