Skip to content

Instantly share code, notes, and snippets.

@michael-wolfenden
Forked from bjrmatos/.gitattributes
Created June 21, 2020 21:00
Show Gist options
  • Save michael-wolfenden/4f1281033e0c4df8f6a94135b7532f2e to your computer and use it in GitHub Desktop.
Save michael-wolfenden/4f1281033e0c4df8f6a94135b7532f2e to your computer and use it in GitHub Desktop.
My default .gitattributes
# Git to autodetect text files and normalise their line endings to LF when they are checked into your repository.
* text=auto
#
# The above will handle all files NOT found below
#
# These files are text and should be normalized (Convert crlf => lf)
*.php text
*.css text
*.js text
*.htm text
*.html text
*.xml text
*.txt text
*.ini text
*.inc text
.htaccess text
# These files are binary and should be left untouched
# (binary is a macro for -text -diff)
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.mov binary
*.mp4 binary
*.mp3 binary
*.flv binary
*.fla binary
*.swf binary
*.gz binary
*.zip binary
*.7z binary
*.ttf binary
# Documents
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
# These files are text and should be normalized (Convert crlf => lf)
*.gitattributes text
.gitignore text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment