How does Git handle line endings and what is `core.autocrlf`?
AdvancedConceptConflicts, remotes, fetch, pull and push
Answer
autocrlf=true converts CRLF to LF on commit and LF to CRLF on checkout (Windows), input converts only on commit. A committed .gitattributes with * text=auto eol=lf is more reliable because it applies to everyone regardless of local config. Mixed endings produce whole-file diffs and phantom conflicts.
git add --renormalize .
More on Conflicts, remotes, fetch, pull and push
What do conflict markers look like and how do you resolve them?BeginnerWhat is `merge.conflictStyle=zdiff3` and why use it?IntermediateHow do you quickly take one side's version for a conflicted file?IntermediateWhat are stages 1, 2 and 3 in the index during a conflict?AdvancedHow do you see what a merge conflict is about before resolving?IntermediateWhat is the difference between `git fetch` and `git pull`?Beginner