2

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.

1 Answer 1

4

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.

Sign up to request clarification or add additional context in comments.

1 Comment

My team is using linux. I'm using Windows with a linux VM. The link helped me. Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.