0

So I am kinda new to git and github and wanted to push a project on github. However, when I add files

git add .

it gives a super long message that does not seem to end

warning: LF will be replaced by CRLF in Lib/site-packages/Django-3.0.3.dist-info/AUTHORS.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Lib/site-packages/Django-3.0.3.dist-info/INSTALLER.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Lib/site-packages/Django-3.0.3.dist-info/LICENSE.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Lib/site-packages/Django-3.0.3.dist-info/LICENSE.python.

This keeps going on, where am I wrong?

Milanor
  • 51
  • 5
  • https://stackoverflow.com/search?q=%5Bgit-add%5D+warning%3A+LF+will+be+replaced+by+CRLF – phd Jan 04 '22 at 20:32

1 Answers1

1

On Linux/Unix machines the end of a line is represented by a LF. On Windows machines, a line is represented by a CR and a LF; CRLF. when you get code from git installed from a Linux/Unix system they will only have one LF. If you don't care that git automatically replaces LFs with CRLFs, you can turn off this warning by typing the following on the git command line:

git config --global core.autocrlf true

Abbreviations
  • LF: Line Feed
  • CR: Carriage Return
  • CRLF: Carriage Return Line Feed

References
Sercan
  • 4,739
  • 3
  • 17
  • 36