X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=pep-git.txt;h=42cce324207616c312ffa2d4283ed5c1dcecaf30;hb=5a0fd8f0ab3191f27410de88e9e25d8d6b8b12c7;hp=51701c9935fcb673cade2b5a89fc8ecfa0548fd4;hpb=bb91e98e10aabd0b8ae3972e10333c68e5ca803d;p=git-wiki.git diff --git a/pep-git.txt b/pep-git.txt index 51701c9..42cce32 100644 --- a/pep-git.txt +++ b/pep-git.txt @@ -199,9 +199,9 @@ and $ git fetch $REMOTE $BRANCH:$BRANCH The first command fetches commits from the named $BRANCH in the -$REMOTE repository that are not in your repository and leaves the id -(the hash) of the head commit in file .git/FETCH_HEAD and updates -remote-tracking branch. +$REMOTE repository that are not in your repository, updates +remote-tracking branch and leaves the id (the hash) of the head commit +in file .git/FETCH_HEAD. The second command fetches commits from the named $BRANCH in the $REMOTE repository that are not in your repository and updates both @@ -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