]> git.phdru.name Git - git-wiki.git/commitdiff
Explain text/eol/binary .gitattributes
authorOleg Broytman <phd@phdru.name>
Wed, 1 Jul 2015 16:06:21 +0000 (19:06 +0300)
committerOleg Broytman <phd@phdru.name>
Wed, 1 Jul 2015 16:39:01 +0000 (19:39 +0300)
pep-git.txt

index 51701c9935fcb673cade2b5a89fc8ecfa0548fd4..bb1d77b73f63e7e7e4036cdaf555afa96deaca6e 100644 (file)
@@ -596,9 +596,23 @@ Advanced configuration
 Line endings
 ------------
 
 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
+<https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html>`_.
+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
 
 
 Advanced topics