Gitflow
📐CRLF / LF Line Ending MessMedium+500 XP
Workshop
Scenario reference

CRLF / LF Line Ending Mess: the situation, step by step

The situation

Windows teammate committed and now every file shows as 'modified' on macOS. `git diff` is full of invisible \r characters.

Set core.autocrlf properly, add a .gitattributes, renormalize.

Medium · 3 steps · +500 XP

What you will practice

This scenario walks through 3 steps, in order:

  1. 01Set the right autocrlf for macOS/Linux
  2. 02Renormalize everything via add
  3. 03Commit the normalization
Reveal the step-by-step commands

Try the terminal first — you learn more by doing. When you want to check yourself, here is the command for each step.

  1. 1. Set the right autocrlf for macOS/Linux
    git config core.autocrlf input
  2. 2. Renormalize everything via add
    git add --renormalize .
  3. 3. Commit the normalization
    git commit -m "chore: normalize line endings"

Key takeaway

Use .gitattributes (`* text=auto`) so it's per-repo, not per-machine.