From 3c69930122749e2c433afedec102dbae698d88d3 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Wed, 1 Jul 2015 19:06:21 +0300 Subject: [PATCH] Explain text/eol/binary .gitattributes --- pep-git.txt | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) 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 -- 2.39.2