简体   繁体   中英

Git problems with line endings differences between linux and windows

I'm working on a project on Windows and some project files seems to be changed locally but I didn't. Was ignoring them but now I cannot push because are unstaged files. When I look into this files differences, there isn't, only this line ending thing (CRLF, LF).

Tried to revert this files, reset --hard too.

Why can't I reset this files to repository HEAD?

Tried to do this too:

git config --global core.autocrlf false

If I do git reset --hard and git status later I get message that have many files with changes not staged.

Sorry but I don't know git and this linux/windows line ending differences very well.

Maybe someone else working on the project introduced bad line endings. two things 2 do:

  1. fix bad line endings already committed.
  2. align the team about the line endings policy.

See: Dealing with line endings .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM