diff options
author | VirtualTam <virtualtam@flibidi.net> | 2015-12-23 19:11:33 +0100 |
---|---|---|
committer | VirtualTam <virtualtam@flibidi.net> | 2015-12-23 23:40:15 +0100 |
commit | c6a7972de51a15d94ccb69dfb008d5560820452c (patch) | |
tree | e66394508419641aaa3233853e241356d4653965 | |
parent | ba83317573a1477d731cbd3d974b601cf9afdba3 (diff) | |
download | Shaarli-c6a7972de51a15d94ccb69dfb008d5560820452c.tar.gz Shaarli-c6a7972de51a15d94ccb69dfb008d5560820452c.tar.zst Shaarli-c6a7972de51a15d94ccb69dfb008d5560820452c.zip |
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 <virtualtam@flibidi.net>
-rw-r--r-- | .gitattributes | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..e616be28 --- /dev/null +++ b/.gitattributes | |||
@@ -0,0 +1,28 @@ | |||
1 | # Set default behavior | ||
2 | * text=auto eol=lf | ||
3 | |||
4 | # Ensure sources are processed | ||
5 | *.css text | ||
6 | *.html text diff=html | ||
7 | *.js text | ||
8 | *.md text | ||
9 | *.php text diff=php | ||
10 | |||
11 | # Do not alter images nor minified scripts | ||
12 | *.ico binary | ||
13 | *.jpg binary | ||
14 | *.png binary | ||
15 | *.min.css binary | ||
16 | *.min.js binary | ||
17 | |||
18 | # Exclude from Git archives | ||
19 | .gitattributes export-ignore | ||
20 | .gitignore export-ignore | ||
21 | .travis.yml export-ignore | ||
22 | composer.json export-ignore | ||
23 | doc/**/*.json export-ignore | ||
24 | doc/**/*.md export-ignore | ||
25 | Doxyfile export-ignore | ||
26 | Makefile export-ignore | ||
27 | phpunit.xml export-ignore | ||
28 | tests/ export-ignore | ||