Gitattributes Generator
Line endings
Binary file types
Git LFS tracking
Linguist overrides
Diff drivers
Custom rules
No custom rules. Add a pattern and its attributes.
# .gitattributes # Managed by AI Dev Hub — Gitattributes Generator # Line-ending normalization * text=auto *.sh text eol=lf *.bash text eol=lf *.zsh text eol=lf *.command text eol=lf *.bat text eol=crlf *.cmd text eol=crlf # Binary files (no diff, no merge, no EOL conversion) *.png binary *.jpg binary *.jpeg binary *.gif binary *.ico binary *.webp binary *.bmp binary *.tiff binary *.woff binary *.woff2 binary *.ttf binary *.otf binary *.eot binary *.zip binary *.gz binary *.tar binary *.7z binary *.rar binary # GitHub Linguist overrides docs/** linguist-documentation *.min.js linguist-generated # Diff drivers *.md diff=markdown
What This Tool Does
Gitattributes Generator is built for deterministic developer and agent workflows.
Generate a .gitattributes file for line-ending normalization, binary files, Git LFS, and linguist overrides.
Use How to Use for execution steps and FAQ for constraints, policies, and edge cases.
Last updated:
This tool is provided as-is for convenience. Output should be verified before use in any production or critical context.
Agent Invocation
Best Path For Builders
Browser workflow
Runs instantly in the browser with private local processing and copy/export-ready output.
Browser Workflow
This tool is optimized for instant in-browser execution with local data handling. Run it here and copy/export the output directly.
/gitattributes-generator/
For automation planning, fetch the canonical contract at /api/tool/gitattributes-generator.json.
How to Use Gitattributes Generator
- 1
Choose line-ending rules
Enable `* text=auto` for cross-platform normalization, then optionally force LF for shell scripts and CRLF for Windows batch files.
- 2
Mark binary and LFS files
Tick the binary categories such as images, fonts, and archives, then select any patterns that should be tracked by Git LFS.
- 3
Add linguist and diff rules
Add linguist overrides to fix language statistics and pick diff drivers like `*.md diff=markdown` for clearer code reviews.
- 4
Add custom patterns
Use the custom rule rows to attach any pattern and attribute string your project needs, for example `*.lockb -diff -merge`.
- 5
Copy or download
Review the generated .gitattributes on the right, then copy it or download the file into the root of your repository.