Skip to content

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

Description

@Ahmad-Alawad

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,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions