Skip to content

Commit e5cdddf

Browse files
authored
fixing .gitattributes (#4006)
1 parent 19d3ace commit e5cdddf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

knowledge/faq.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,12 @@ ERROR: Obtaining different revisions in Linux and Windows
118118

119119
Git will (by default) checkout files in Windows systems using ``CRLF`` line endings, effectively producing different files than in Linux that files will use ``LF`` line endings. As files are different, the Conan recipe revision will be different from the revisions computed in other platforms such as Linux, resulting in missing the respective binaries in the other revision.
120120

121-
Conan will not normalize or change in any way the source files, it is not its responsibility and there are risks of breaking things. The source control is the application changing the files, so that is a more correct place to handle this. It is necessary to instruct Git to do the checkout with the same line endings. This can be done several ways, for example, by adding a ``.gitattributes`` file to the project repository:
121+
Conan will not normalize or change in any way the source files, it is not its responsibility and there are risks of breaking things. The source control is the application changing the files, so that is a more correct place to handle this. It is necessary to instruct Git to do the checkout with the same line endings. This can be done several ways, for example, by adding a ``.gitattributes`` file to the project repository with something like:
122122

123123
.. code-block:: ini
124124
125-
[auto]
126-
crlf = false
125+
* text eol=lf
126+
127127

128128
Other approach would be to change the ``.gitconfig`` to change it globally. Modern editors (even Notepad) in Windows can perfectly work with files with ``LF``, it is no longer necessary to change the line endings.
129129

0 commit comments

Comments
 (0)