rbk-org / TechnicalIssues

0 stars 1 forks source link

fatal error: LF would be replaced by CRLF in <file name> #2

Open Ahmad-Alawad opened 7 years ago

Ahmad-Alawad commented 7 years ago

Problem: In Windows OS, when you try to git add and you get this error “fatal: LF would be replaced by CRLF in “, the issue is mainly with the encoding since the code is written using Sublime on another OS and the encoding is different. .

Solution: Mainly change the encoding to UTF-16 LE for Windows. This could be done in many ways:

  1. File -> Save With Encoding -> UTF-16 LE
  2. Locate the encoding option at the bottom of Sublime and change it to UTF-16 LE. If you didn't find it, open the User Preferences file and add this to the object: "show_encoding": true,
almuhder commented 7 years ago

I found this; https://help.github.com/articles/dealing-with-line-endings/