-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitattributes
More file actions
54 lines (48 loc) · 1.7 KB
/
.gitattributes
File metadata and controls
54 lines (48 loc) · 1.7 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# 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.
# These used a glob pattern originally, but apparently this actually does not work
*.bat text eol=crlf
*.bAt text eol=crlf
*.baT text eol=crlf
*.bAT text eol=crlf
*.Bat text eol=crlf
*.BAt text eol=crlf
*.BaT text eol=crlf
*.BAT text eol=crlf
*.cmd text eol=crlf
*.cMd text eol=crlf
*.cmD text eol=crlf
*.cMD text eol=crlf
*.Cmd text eol=crlf
*.CMd text eol=crlf
*.CmD text eol=crlf
*.CMD text eol=crlf
*.ps1 text eol=crlf
*.Ps1 text eol=crlf
*.pS1 text eol=crlf
*.PS1 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
*.sH text eol=lf
*.Sh text eol=lf
*.SH text eol=lf