From: Oleg Broytman Date: Wed, 1 Jul 2015 16:06:21 +0000 (+0300) Subject: Explain text/eol/binary .gitattributes X-Git-Url: https://git.phdru.name/?p=git-wiki.git;a=commitdiff_plain;h=3c69930122749e2c433afedec102dbae698d88d3 Explain text/eol/binary .gitattributes --- diff --git a/pep-git.txt b/pep-git.txt index 51701c9..bb1d77b 100644 --- a/pep-git.txt +++ b/pep-git.txt @@ -596,9 +596,23 @@ Advanced configuration Line endings ------------ -Git has builtin mechanisms to handle line endings. +Git has builtin mechanisms to handle line endings between platforms +with different EOL styles. To allow git to do CRLF conversion assign +``text`` attribute to files using `.gitattributes +`_. +For files that have to have specific line ending assign ``eol`` +attribute. For binary files the attribute is, naturally, ``binary``. -TODO: describe crlf configuration and .gitattributes. +For example:: + + $ cat .gitattributes + *.py text + *.txt text + *.png binary + /readme.txt eol=CRLF + +To check what attributes git uses for files use ``git check-attr`` +command. Advanced topics