William Weckl
William Weckl

Reputation: 2465

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.

Upvotes: 2

Views: 1992

Answers (1)

ryenus
ryenus

Reputation: 17381

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.

Upvotes: 4

Related Questions