github/gitignore — pull request #334 by mkenyon (2012-05-01 22:14:01+00:00)
Title: Add OSX-specific Icon\r rule

If you have a git repository at the root level of a writable disk image in OSX, git will try to track a file called `Icon\r`. That `\r` is not a backslash followed by an r, it is a carriage return, sometimes shown as `^M` or `\015`.

There used to be an overly-broad rule to exclude this file but it was removed in #183 for excluding too much. My fix was generated using the following commands in `irb`:

f = File.open("Global/OSX.gitignore", "a+") #append
f.write("Icon\r\r")
f.close

Note that the *Files Changed* tab does not show the change properly. Credit goes to @kamal for his [writeup].

[writeup]: http://blog.bitfluent.com/post/173740409/ignoring-icon-in-gitignore