From c3310c6e8f11cc6db840aa512c3abfb009b7b6a8 Mon Sep 17 00:00:00 2001 From: John Keiser Date: Sun, 4 Aug 2019 15:11:48 -0700 Subject: [PATCH] Add sane defaults for .sh and such (#254) --- .gitattributes | 128 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 113 insertions(+), 15 deletions(-) diff --git a/.gitattributes b/.gitattributes index 46a38ca9..853070f3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,19 +1,117 @@ # Set the default behavior, in case people don't have core.autocrlf set. # Uncomment next line to adjust line endings -* text=auto +* text=auto -# Explicitly declare text files you want to always be normalized and converted -# to native line endings on checkout. -*.c text -*.cpp text -*.h text -*.java text -*.xml text - - -# Denote all files that are truly binary and should not be modified. -*.png binary -*.jpg binary -*.svg binary -*.json binary # we don't want json files to be modified for this project +*.json binary + + +# Common settings that generally should always be used with your language specific settings + +# +# From generator: +# https://www.davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/ +# + +# Documents +*.bibtex text diff=bibtex +*.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 +*.tex text diff=tex +*.adoc text +*.textile text +*.mustache text +*.csv text +*.tab text +*.tsv text +*.txt text +*.sql text + +# Graphics +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.tif binary +*.tiff binary +*.ico binary +# SVG treated as an asset (binary) by default. +*.svg text +# If you want to treat it as binary, +# use the following line instead. +# *.svg binary +*.eps binary + +# Scripts +*.bash text eol=lf +*.sh text eol=lf +# These are explicitly windows files and should use crlf +*.bat text eol=crlf +*.cmd text eol=crlf +*.ps1 text eol=crlf + +# Serialisation +#*.json text +*.toml text +*.xml text +*.yaml text +*.yml text + +# Archives +*.7z binary +*.gz binary +*.tar binary +*.zip binary + +# +# Exclude files from exporting +# + +.gitattributes export-ignore +.gitignore export-ignore + +# Sources +*.c text diff=c +*.cc text diff=cpp +*.cxx text diff=cpp +*.cpp text diff=cpp +*.c++ text diff=cpp +*.hpp text diff=cpp +*.h text diff=c +*.h++ text diff=cpp +*.hh text diff=cpp + +# Compiled Object files +*.slo binary +*.lo binary +*.o binary +*.obj binary + +# Precompiled Headers +*.gch binary +*.pch binary + +# Compiled Dynamic libraries +*.so binary +*.dylib binary +*.dll binary + +# Compiled Static libraries +*.lai binary +*.la binary +*.a binary +*.lib binary + +# Executables +*.exe binary +*.out binary +*.app binary