Skip to content

Instantly share code, notes, and snippets.

@bjrmatos
Created June 4, 2014 02:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bjrmatos/6816bc9583dc890b418d to your computer and use it in GitHub Desktop.
Save bjrmatos/6816bc9583dc890b418d 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