Skip to content

Instantly share code, notes, and snippets.

@turboBasic
Created November 10, 2019 18:08
Show Gist options
  • Save turboBasic/102995307c4822a008e9811936a85e38 to your computer and use it in GitHub Desktop.
Save turboBasic/102995307c4822a008e9811936a85e38 to your computer and use it in GitHub Desktop.
Advanced Gitattributes settings
# COMMON SETTINGS THAT GENERALLY SHOULD ALWAYS BE USED WITH YOUR LANGUAGE
# SPECIFIC SETTINGS
#
# taken from: https://github.com/alexkaratarakis/gitattributes
# Auto detect text files and perform LF normalization
# http://davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/
* text=auto
#
# The above will handle all files NOT found below
#
# git config
.gitattributes text
.gitignore text
*.md text
# 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
*.md text
*.adoc text
*.textile text
*.mustache text
*.csv text
*.tab text
*.tsv text
*.sql text
# Graphics
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.tif binary
*.tiff binary
*.ico binary
*.eps binary
#
# SVG treated as an asset (binary) by default. If you want to treat it as text,
# comment-out the following line and uncomment the line after.
# *.svg binary
*.svg text
## BASIC .GITATTRIBUTES FOR A PYTHON REPO
# Source files
*.pxd text
*.py text
*.py3 text
*.pyw text
*.pyx text
# Binary files
*.db binary
*.p binary
*.pkl binary
*.pyc binary
*.pyd binary
*.pyo binary
# Note: .db, .p, and .pkl files are associated
# with the python modules ``pickle``, ``dbm.*``,
# ``shelve``, ``marshal``, ``anydbm``, & ``bsddb``
# (among others).# These settings are for any web project
## GITATTRIBUTES FOR WEB PROJECTS
#
## These files are text and should be normalized (Convert crlf => lf)
#
# source code
*.bat text eol=crfl
*.coffee text
*.css text
*.htm text
*.html text
*.inc text
*.ini text
*.js text
*.json text
*.jsx text
*.less text
*.php text
*.pl text
*.py text
*.rb text
*.sass text
*.scm text
*.scss text
*.sh text eol=lf
*.sql text
*.styl text
*.svg text
*.tag text
*.ts text
*.tsx text
*.txt text
*.xml text
*.xhtml text
## Powershell (https://gist.github.com/KirkMunro/d873a755b38a7bfa2495)
*.ps1 text eol=crlf
*.ps1xml text eol=crlf
*.psc1 text eol=crlf
*.psd1 text eol=crlf
*.psm1 text eol=crlf
*.clixml text eol=crlf
*.xml text eol=crlf
# templates
*.ejs text
*.hbt text
*.jade text
*.haml text
*.hbs text
*.dot text
*.tmpl text
*.phtml text
## LINTERS / code analysis config
.csslintrc text
.eslintrc text
.htmlhintrc text
.jscsrc text
.jshintignore text
.jshintrc text
.stylelintrc text
# misc config
*.bowerrc text
*.npmignore text
*.yaml text
*.yml text
.editorconfig text
.htaccess text
Makefile text
makefile text
# Heroku
Procfile text
.slugignore text
# Documentation
*COPYRIGHT* text
*README* text
AUTHORS text
CHANGELOG text
CHANGES text
CONTRIBUTING text
COPYING text
INSTALL text
LICENSE text
NEWS text
TODO text
copyright text
license text
readme text
# (binary is a macro for -text -diff)
*.7z binary
*.eot binary
*.fla binary
*.flv binary
*.gz binary
*.mov binary
*.mp3 binary
*.mp4 binary
*.otf binary
*.pdf binary
*.pyc binary
*.swf binary
*.ttf binary
*.woff binary
*.woff2 binary
*.zip binary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment