forked from nsacyber/Windows-Secure-Host-Baseline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitattributes
33 lines (27 loc) · 1.47 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
31
32
33
# tell git to not change line endings. -text should also work according to https://git-scm.com/docs/gitattributes
* -crlf
# make sure git never changes line endings in certificate files by marking them as binary
*.cer binary
# treat Group Policy templates as text so they can be diffed
*.adml diff linguist-language=XML
*.admx diff linguist-language=XML
*.adm diff linguist-language=XML
# treat Group Policy back up files as text so they can be diffed
*.cmtx diff linguist-language=XML
*.inf diff linguist-language=INI
*.csv diff
*.xml diff
*.pol diff
# treat registry files as text so they can be diffed
*.reg diff
# Despite the above settings, GitHub diffs will still say "Binary file not shown." for some files because GitHub ignores this for their display of web-based diffs.
# git diffs will work as expected, but not GitHub web-based diffs
# References:
# 1. http://stackoverflow.com/a/24382933
# "GitHub doesn't use .gitattributes files for choosing which files to show in a diff"
# 2. https://github.com/github/linguist/issues/1873#issuecomment-158671709
# "GitHub doesn't seem to honor the diff attribute"
# linguage-language is used to treat some Group Policy files as XML for repository statistics (does not affect syntax highlighting)
# https://github.com/github/linguist/blob/master/README.md#using-gitattributes
# https://github.com/github/linguist/blob/master/lib/linguist/languages.yml
# https://github.com/github/linguist/blob/master/CONTRIBUTING.md