]> git.phdru.name Git - git-wiki.git/blobdiff - pep-git.txt
Explain text/eol/binary .gitattributes
[git-wiki.git] / pep-git.txt
index d215a585978b640279a538aebed908cc22eeeb05..bb1d77b73f63e7e7e4036cdaf555afa96deaca6e 100644 (file)
@@ -326,6 +326,11 @@ from it) you do that in two steps using two repositories: you push
 from the workstation to a bare repo on the remote host, ssh to the
 remote host and pull from the bare repo to a non-bare deployment repo.
 
+That changed in git 2.3, but see `the blog post
+<https://github.com/blog/1957-git-2-3-has-been-released#push-to-deploy>`_
+for caveats; in 2.4 the push-to-deploy feature was `further improved
+<https://github.com/blog/1994-git-2-4-atomic-pushes-push-to-deploy-and-more#push-to-deploy-improvements>`_.
+
 Tags
 ''''
 
@@ -591,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
+<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``.
+
+For example::
+
+    $ cat .gitattributes
+    *.py text
+    *.txt text
+    *.png binary
+    /readme.txt eol=CRLF
 
-TODO: describe crlf configuration and .gitattributes.
+To check what attributes git uses for files use ``git check-attr``
+command.
 
 
 Advanced topics