From: VirtualTam Date: Wed, 23 Dec 2015 18:11:33 +0000 (+0100) Subject: Add a .gitattributes to ease repository management X-Git-Tag: v0.6.3~17^2 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;ds=sidebyside;h=refs%2Fpull%2F419%2Fhead;p=github%2Fshaarli%2FShaarli.git Add a .gitattributes to ease repository management Features: - enforce LF (Unix) line endings - omit dev/test resources & code from Git(Hub) archives - treat minified resources (CSS, JS) as binaries to avoid cluttered diffs Resources: - http://git-scm.com/docs/gitattributes - https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes - https://help.github.com/articles/dealing-with-line-endings/ - http://adaptivepatchwork.com/2012/03/01/mind-the-end-of-your-line/ - https://github.com/Danimoth/gitattributes Signed-off-by: VirtualTam --- diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..e616be28 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,28 @@ +# Set default behavior +* text=auto eol=lf + +# Ensure sources are processed +*.css text +*.html text diff=html +*.js text +*.md text +*.php text diff=php + +# Do not alter images nor minified scripts +*.ico binary +*.jpg binary +*.png binary +*.min.css binary +*.min.js binary + +# Exclude from Git archives +.gitattributes export-ignore +.gitignore export-ignore +.travis.yml export-ignore +composer.json export-ignore +doc/**/*.json export-ignore +doc/**/*.md export-ignore +Doxyfile export-ignore +Makefile export-ignore +phpunit.xml export-ignore +tests/ export-ignore