1

I got bunch of these message after i added some files to git for staging

warning: LF will be replaced by CRLF in 

Found out it was about line endings, after it was done. I git commit to add my files but then found out that a bunch of other files we're added.

How do i remove those files from the warning and preserve the files i added before it?

JEEZSUSCRIZE
  • 174
  • 2
  • 16

1 Answers1

2

As you probably know windows and linux use different encodings for line endings. Since different developer may work with different OS git by default store everything in linux mode (with a LF and a CR, Line Finish and Carriage Return). When you pull or push something a conversion is operated so that your client receive files formatted for your OS, or the server receive files formatted in linux mode.

If you want you can change this behaviour, with the config option core.autocrlf: you can find a detailed explanation of the parameter here: https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration

ErniBrown
  • 1,283
  • 12
  • 25