Tag Archives: git windows

Conflict between git windows and MAC newline

After chopping hands, the fraud call came before the express delivery was received. How to improve the privacy and security of e-commerce>>>

When I encounter these two errors, I basically ask you to set autocrlf to false. But I don’t think it’s proper

If the line feed character in your source file is LF and autocrlf = true, GIT add will encounter a fatal: LF would be replaced by CRLF error. There are two solutions:

1. Convert LF in your source file to CRLF [recommended]

2. Set autocrlf to false

If your source file contains a new line character, CRLF, and autocrlf = input, GIT add will also encounter a fatal: CRLF would be replaced by lf error. There are two solutions:

1. Convert CRLF in your source file to LF [recommended]

2. Set autocrlf to true or false

My advice: set autocrlf = input on MAC and set autocrlf = true on windows (the default)

———————————————————————————————————————————-

In this case

Windows:(true)

When submitting, transfer CRLF to LF and submit again

When cutting out, the LF is automatically converted to CRLF

MAC/Linux: (input)

When submitting, transfer CRLF to LF and submit again

When cutting out, keep LF

In this way, it will always be LF in the warehouse, CRLF in Windows workspace and LF in MAC/Linux workspace