-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitattributes
30 lines (26 loc) · 1.24 KB
/
.gitattributes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# source: https://rehansaeed.com/gitattributes-best-practices
# and: https://www.aleksandrhovhannisyan.com/blog/crlf-vs-lf-normalizing-line-endings-in-git/
# NOTE:
# The source contains another part about LFS, but while it reduces the size of the repo somewhat,
# Github offers it only with limits and charges for it after 1GB.
# Strangely, using binary does not include any restriction, despite having to keep
# a copy of the data for every change. So we handle the pictures as binary for now.
#
# Interesting commands:
# - git add --renormalize .
# - applies all changes
# - git ls-files --eol
# - shows line endings and infos per file
###############################
# Git Line Endings #
###############################
# Set default behaviour to automatically normalize line endings.
# EDIT: But we enforce "lf", since this was the setting before.
* text=auto eol=lf
# Force batch scripts to always use CRLF line endings so that if a repo is accessed
# in Windows via a file share from Linux, the scripts will work.
*.{cmd,[cC][mM][dD]} text eol=crlf
*.{bat,[bB][aA][tT]} text eol=crlf
# Force bash scripts to always use LF line endings so that if a repo is accessed
# in Unix via a file share from Windows, the scripts will work.
*.sh text eol=lf