Free GitAttributes File Generator & Line Ending Normalizer—
gemini-3.0-flash
Easily generate and validate .gitattributes files for consistent LF and CRLF line ending normalization. Fix cross-platform Git repository issues with this free tool.
What This App Does
Easily generate and validate .gitattributes files for consistent LF and CRLF line ending normalization. Fix cross-platform Git repository issues with this free tool. — generated by gemini-3.0-flash and published by @Akhenaten on Slopstore. Categorized under Utility, this app is part of Slopstore's curated collection of AI-generated tools and experiments. Run it free in your browser. No installation needed.
AI Generation Prompt
Technical Specification: GitAttributes Line Ending Normalizer
Overview
A single-file, browser-based utility that enables developers to generate, preview, and configure a valid .gitattributes file. The tool prevents common cross-platform Git issues caused by disparate line endings (LF vs CRLF).
Core Features
- Preset Selector: One-click configuration presets for:
Standard Web Project(Defaulting to LF for JS/CSS/HTML).Windows-Native Project(Defaulting to CRLF).Cross-Platform/Universal(Safe defaults).
- Custom Rule Editor: A dynamic list interface to add specific rules for file extensions (e.g.,
*.ps1 text eol=crlf,*.sh text eol=lf). - Real-Time Preview: A syntax-highlighted code block that updates instantly as options are toggled.
- Copy-to-Clipboard: A robust, UI-feedback-driven copy mechanism.
- Implementation Guide: A collapsible "How to Apply" section that explains the
git add --renormalizeworkflow. - Validation: Basic syntax checking to ensure no invalid characters or patterns are included.
UI/UX Design
- Aesthetic: SaaS-professional, clean white/gray background (#f8fafc), high-contrast dark text (#1e293b). Use soft drop shadows (
shadow-sm) for content cards. - Color Palette:
- Primary: Deep Blue (
#2563eb) for action buttons. - Accent: Success Green (
#16a34a) for copy confirmation. - Border: Neutral Gray (
#e2e8f0).
- Primary: Deep Blue (
- Layout:
- Header: Large, clear title and subtitle.
- Main Content Area: Two-column layout on desktop (Configuration settings on left, generated code on right). Stacks vertically on mobile.
- No Footer: Entirely self-contained in a single view.
- Micro-interactions: Smooth transitions on hover states (
transition-all duration-200). Fade-in animations for new rule additions.
Technical Directives
- Architecture: Single HTML file containing embedded CSS and Vanilla JS. No external build steps.
- State Management: Use plain JS objects to manage the rule list. No
localStorageorsessionStorage. All state resets on refresh. - Security/Compliance:
- No
alert()orprompt(). Use a custom, floating Toast notification for copy successes or validation errors. - Sandboxed Iframe compatible: Zero external dependencies that require cookies or storage persistence.
- External links must use
rel="noopener noreferrer".
- No
- Responsiveness: Use Flexbox and CSS Grid to ensure the tool is usable on mobile devices, tablets, and wide-screen monitors.
- Dependencies: Use CDN links for Tailwind CSS (via script tag) for rapid, consistent styling without local files.
Spread the word
Files being used
Frequently Asked Questions
Everything you need to know about using this application.
Why do I need a .gitattributes file in my project?
A .gitattributes file is essential for ensuring consistent file handling across different operating systems, particularly regarding line endings. When contributors use different platforms like Windows (CRLF) and macOS or Linux (LF), Git can incorrectly report files as modified, or introduce inconsistent line endings into the repository history. By explicitly defining these rules, you force Git to normalize line endings during the checkout and commit processes. This prevents unnecessary 'diff' noise in your pull requests and ensures that your project maintains a clean, uniform codebase regardless of the environment your contributors are using.
What is the difference between LF and CRLF in Git repositories?
LF (Line Feed) is the standard line ending used on Unix-based systems like Linux and macOS. It is represented by a single character (\n). Conversely, CRLF (Carriage Return + Line Feed) is the legacy standard used by Windows, represented by two characters (\r\n). These fundamental differences can cause significant friction in collaborative development workflows. If Git does not properly normalize these endings, a developer on Windows might commit a file that looks completely different to a developer on macOS, even if the actual content of the code is identical. This often leads to frustrating 'merge conflicts' and repository bloat that complicate the development process.
How does this generator tool handle line endings safely?
This generator provides a user-friendly interface to build the correct 'text eol=lf' or 'text eol=crlf' configuration rules tailored to your project's specific needs. It adheres to the official Git documentation standards, ensuring that you apply normalization selectively to source code files while protecting binary files from potential corruption. Once generated, you can simply copy the resulting content into a file named '.gitattributes' at the root of your repository. The tool also provides clear instructions on how to use 'git add --renormalize .' to immediately update your existing repository history to match the new configuration rules.
Can I use this tool for projects other than Git?
While this specific tool is designed to generate the proprietary syntax used for the Git version control system, the principles of line ending normalization are universal in software engineering. However, the configuration output generated here is exclusively formatted for the Git environment and will not function in other version control systems or build tools. If you are using a different version control system, you should consult that specific tool's documentation for its unique line ending handling mechanisms. This generator is optimized strictly for professional Git-based workflows, ensuring high-accuracy output for standard repository configurations.
Related Applications

Free EDI X12 Syntax Highlighter & Parser Tool
Easily visualize and parse complex EDI X12 files with our free syntax highlighter. Analyze ISA, GS, ST, and SE segments instantly with an intuitive web interface.

Free Online Payment Processing Fee & Reverse Fee Calculator
Calculate payment processing fees and reverse fees instantly. Determine exactly how much to charge to receive your target net amount with this free tool.

Free Specific Heat Capacity & Calorimetry Calculator
Calculate heat energy, mass, specific heat, and temperature change instantly. Use our free thermodynamics calculator for physics and chemistry calorimetry problems.

Free Online XML Sitemap Index Generator
Generate a valid XML sitemap index file by combining multiple sitemap URLs. A fast, browser-based, and private tool for SEO optimization and web indexing.
Discover more free AI apps on Slopstore — the community platform for hosting AI-generated web applications.