chore: add .gitattributes to normalize line endings#411
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a1d86fcf46
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| *.ttf binary | ||
| *.otf binary | ||
| *.fbx binary | ||
| *.unity binary |
There was a problem hiding this comment.
Treat Unity scene files as text, not binary
Marking *.unity as binary prevents Git from doing line-based diffs and merges on scene files, which are YAML text. This makes resolving concurrent edits to scenes much harder (Git won’t attempt textual merges and most tooling will treat the file as opaque), so collaborating on scene changes becomes painful and conflicts are more likely to require manual rework. Consider keeping *.unity as text eol=lf like other Unity YAML assets.
Useful? React with 👍 / 👎.
Motivation
eol=lf) as the canonical line ending and ensure Unity-related files and common docs/configs are handled correctly by Git.Description
.gitattributeswith* text=auto eol=lf, explicittext eol=lfrules for Unity/C#/UI Toolkit files (*.cs,*.uxml,*.uss,*.shader,*.compute,*.meta), rules for docs/config (*.md,*.txt,*.json,*.yml,*.yaml), andbinaryentries for image, audio, font, model and scene extensions (e.g.*.png,*.wav,*.ttf,*.fbx,*.unity).Testing
Codex Task