git-repo-normalize
Installation
SKILL.md
Git Repo Normalize
Workflow
-
Detect the repository scope first.
- Run
git rev-parse --is-inside-work-treeandgit rev-parse --show-toplevel. - Manage
.gitattributesonly at the repository root.
- Run
-
Normalize before doing other repository work.
- Do not postpone line-ending normalization until the end of the task.
- Treat the first Git-facing handling of a repo as the normalization point.
- If the root
.gitattributesdoes not contain* text=auto eol=lf, add or merge that rule instead of replacing the file. - Preserve existing user rules and binary file patterns.
-
Inspect the repo signals that explain LF/CRLF drift.
- Read
.editorconfigwhen present and check whether it already declaresend_of_line = lf. - Read
git config --get core.autocrlfto explain local warnings, but do not treat global Git config as the fix. - Use
git ls-files --eolon representative files when the repository state is unclear.
- Read