Make Git “LF will be replaced by CRLF” warnings go away

前端 未结 6 1166
旧时难觅i
旧时难觅i 2020-12-07 14:06

I have setup Git so it doesn\'t commit inconsistent line endings. The problem with that is a whole pile of files appear modified even though they are not. What do I type to

6条回答
  •  误落风尘
    2020-12-07 14:29

    Note that note all of the above fixes may work for you, for example you might have received the code through a simple file transfer. You can accept each warning by pressing ENTER, but on on large repos that can take ages. Another way to ignore the conversion on code that has already been checked-out and edited is to create a patch file:

    git diff > changes.patch
    

提交回复
热议问题