line-endings

Configure Git line endings for cross-platform development teams.

24|3|Updated Jan 24, 2026
One-click install
npx skills add https://github.com/Prorise-cool/prorise-claude-skills --skill line-endings
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: line-endings
Source: https://github.com/Prorise-cool/prorise-claude-skills/tree/main/.claude/skills/devops-specialist/references/domains/github-platform/core/line-endings
Command: npx skills add https://github.com/Prorise-cool/prorise-claude-skills --skill line-endings

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill solves the common and frustrating problem of inconsistent line endings in Git repositories, which can lead to unexpected errors, massive diffs, and merge conflicts across different operating systems.

Core Features & Use Cases

  • Cross-Platform Compatibility: Ensures your code works seamlessly whether developed on Windows, macOS, or Linux.
  • Configuration Guidance: Provides clear, actionable steps for configuring Git's line ending behavior (core.autocrlf, core.eol, core.safecrlf).
  • .gitattributes Mastery: Guides you in creating and utilizing .gitattributes files for explicit, repository-wide control over line endings.
  • Troubleshooting: Helps diagnose and fix common issues like shell scripts failing to execute or every line appearing changed in Git diffs.
  • Use Case: A team with developers on Windows and macOS is collaborating on a project. Without proper line ending configuration, shell scripts might fail on macOS, and diffs could show every file as modified. This Skill provides the exact commands and .gitattributes rules to prevent these issues, ensuring consistent LF line endings for scripts and cross-platform compatibility.

Quick Start

Configure your Git environment to handle line endings correctly for cross-platform development.

Frequently Asked Questions about line-endings

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix Git line endings causing massive diffs across Windows and macOS?

Git line endings causing massive diffs are fixed by configuring `core.autocrlf` and `.gitattributes` to enforce consistent LF normalization across Windows and macOS. This prevents every file from appearing modified during cross-platform commits.

Why do shell scripts fail to execute on macOS after pulling from a Git repository?

Shell scripts fail to execute on macOS when Git line endings are configured as CRLF instead of LF. Setting `core.eol` and adding `.gitattributes` rules ensures shell scripts retain executable LF line endings across operating systems.

What is the best way to configure Git line endings for cross-platform development teams?

The best way to configure Git line endings for cross-platform teams is using a `.gitattributes` file for repository-wide control, supplemented by `core.autocrlf` settings to handle OS-specific CRLF and LF conversions automatically.

When should I use .gitattributes instead of core.autocrlf for line ending normalization?

Use `.gitattributes` instead of `core.autocrlf` when you need explicit, repository-wide line ending control that travels with the code. It ensures consistent LF or CRLF handling across all team members regardless of local Git settings.

Does core.safecrlf prevent line ending corruption in Git?

Yes, `core.safecrlf` prevents irreversible line ending corruption in Git by warning when a normalization operation changes line endings unexpectedly. It acts as a safety check during cross-platform CRLF and LF conversions.