Use this file to discover all available pages before exploring further.
The .gitattributes file allows you to specify attributes for paths in your repository. Attributes control various Git behaviors like line ending normalization, diff generation, merge strategies, and more.
# Auto-detect text files and normalize line endings* text=auto# Declare text files*.txt text*.md text*.js text# Declare binary files*.png binary*.jpg binary# Custom diff for specific files*.json diff=json
# Match all .txt files*.txt text# Match only at root/config.json text# Match in any subdirectory**/docs/*.md text# Match entire directoryvendor/** binary
# Auto-detect text files* text=auto# Source code*.js text eol=lf*.ts text eol=lf*.py text eol=lf*.rb text eol=lf*.go text eol=lf# Shell scripts (Unix line endings)*.sh text eol=lf*.bash text eol=lf# Windows scripts (Windows line endings)*.bat text eol=crlf*.cmd text eol=crlf*.ps1 text eol=crlf# Documentation*.md text eol=lf*.txt text eol=lf# Binary files*.png binary*.jpg binary*.gif binary*.ico binary*.pdf binary
# Normalize all text files* text=auto# Unix shell scripts*.sh text eol=lf*.bash text eol=lf# Windows scripts*.bat text eol=crlf*.cmd text eol=crlf*.ps1 text eol=crlf# Source code (LF)*.c text eol=lf*.cpp text eol=lf*.h text eol=lf*.java text eol=lf*.py text eol=lf# Configuration files*.json text eol=lf*.xml text eol=lf*.yaml text eol=lf*.yml text eol=lf# Documentation*.md text eol=lf*.txt text eol=lf# Binary files*.png binary*.jpg binary*.pdf binary*.zip binary
# Unity YAML*.meta text eol=lf*.unity text eol=lf*.asset text eol=lf*.prefab text eol=lf*.mat text eol=lf*.anim text eol=lf*.controller text eol=lf# Unity binary*.cubemap binary*.unitypackage binary# 3D models*.fbx binary*.obj binary*.blend binary*.3ds binary# Audio*.mp3 binary*.wav binary*.ogg binary# Textures*.png binary*.jpg binary*.tga binary*.psd binary
# Check specific attributegit check-attr text README.md# Check all attributesgit check-attr -a README.md# Check multiple filesgit check-attr text *.txt
After adding or changing .gitattributes, normalize existing files:
# Show what would be normalizedgit add --renormalize --dry-run .# Normalize all tracked filesgit add --renormalize .git statusgit commit -m "Normalize line endings"
# Auto-detect text files and normalize line endings to LF* text=auto# Explicitly declare text files*.txt text*.md text*.json text*.xml text*.yaml text*.yml text# Scripts*.sh text eol=lf*.bash text eol=lf*.bat text eol=crlf*.cmd text eol=crlf*.ps1 text eol=crlf# Source code*.c text eol=lf diff=cpp*.cpp text eol=lf diff=cpp*.h text eol=lf diff=cpp*.java text eol=lf diff=java*.py text eol=lf diff=python*.js text eol=lf diff=javascript*.go text eol=lf diff=golang# Binary files*.png binary*.jpg binary*.jpeg binary*.gif binary*.ico binary*.pdf binary*.zip binary*.tar binary*.gz binary*.exe binary*.dll binary*.so binary# Export settings.gitattributes export-ignore.gitignore export-ignore.github/ export-ignoretests/ export-ignore