Git · Junior · Question 60 of 75
Why do Windows and macOS users sometimes see every line of a file as changed?
- 1File permissions are compared as part of the content
- ✓Correct answer: Different line endings (CRLF vs LF) were committed
- 3Git stores files in a different encoding per OS
Explanation
Configure core.autocrlf or, better, a .gitattributes rule like * text=auto eol=lf, so the repository stores LF and each OS gets what it needs.