orangeduck / BuildYourOwnLisp

Learn C and build your own programming language in under 1000 lines of code!
http://www.buildyourownlisp.com/
Other
2.9k stars 394 forks source link

.gitattributes to ignore differences between file endings #58

Closed igalic closed 10 years ago

igalic commented 10 years ago

.gitattributes can be used to ignore different line endings in text.

This is useful for a text whose target audience are all (3) platforms, and who can be expected to contribute back from all (3) of those platforms.

The procedure, thanks to git's lovely standard behaviour of whateverworksforlinus, is a bit involved:

$ echo "* text=auto" >>.gitattributes
$ rm .git/index     # Remove the index to force Git to
$ git reset         # re-scan the working directory
$ git status        # Show files that will be normalized
$ git add -u
$ git add .gitattributes
$ git commit -m "Introduce end-of-line normalization"

But might be worth it.

orangeduck commented 10 years ago

Thanks. I often forget to do this, and when my text editor on windows updates it silently resets to window line endings which pisses everyone off. This should be done now.