-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitattributes
143 lines (124 loc) · 5.15 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# A general, hopefully informative .gitattributes file
#+ Created for a repo with my Manuscript reuse - binding waste presentation
##############################################################################
#@brief: A .gitattributes file for my MS Manuscript reuse presentation
#@file .gitattributes
#@author David BLACK GH: @bballdave025
#@since 2024-01-30
#
# -v- In case this file gets copied to another repo without changing -v-
#+ -v- this stuff, there will be a reference to the previous repo -v-
#@orig_repo manuscript-waste-reuse-finder
#@project Manuscripts and Machine Learning - Reusing Binder's Waste
#@package None for now.
#
# Mostly here to preserve *NIX-style line endings, which are very important
#+ for certain data and text files in the Bourne Again SHell (bash) files,
#+ ... The python files don't care.
#
#@ref : https://git-scm.com/docs/gitattributes
#@archived-ref = "https://web.archive.org/web/20200527202947/" + \
# "https://git-scm.com/docs/gitattributes"
#
##############################################################################
#
#+ Set the default behavior, in case people don't have `core.autocrlf` set.
#+ I don't know how to make this match core.autocrlf = input
#+ The closest I can find is
#+ @ref : https://stackoverflow.com/a/46592252/6505499
#+ @archived-ref = "https://web.archive.org/web/20200527203643/" + \
#+ "https://stackoverflow.com/questions/46590142/" + \
#+ "what-is-the-differrence-between-text-auto-and-" + \
#+ "text-eol-lf-in-gitattribu/46592252#46592252"
#
#> If you write, in a single .gitattributes file, the two line sequence:
#> `* text=auto`
#> `* text eol=lf`
#> the second line's `text` overrides the first one's, so that `text`
#> is set (but not to a value) and `eol` is set to a value, with the
#> value being `lf`. Both lines matched, and the second line overrode
#> the first.
#> If you reverse the two lines:
#> `* text eol=lf`
#> `* text=auto`
#> then again both lines match but now the second line only
#> overrides the text setting, so now you have `text` set to `auto`
#> and eol set to lf.
#> `* text eol=lf`
#> `* text=auto`
#>
# I'm pretty sure this second version is giving me what I want.
#
#
## Setting the default behavior, in case people don't have
##+ `core.autocrlf` set.
* text eol=lf
* text=auto
## Specific files that ABSOLUTELY need to be treated as text and have
#+ *NIX-style endings. (Note we have no `*.ext text`, because we do
#+ not want any files normalized and converted to native line endings
#+ on checkout.) We also hate CRLF endings, unless someone has built
#+ on VS or is doing CMD/PowerShell scripting or has XLSX files.
## The LF line endings should always be there on checkout.
*.ipynb text eol=lf
## Probably found automatically, but let's make sure
*.sh text eol=lf
*.py text eol=lf
*.md text eol=lf
*.txt text eol=lf
*.cfg text eol=lf
*.bak text eol=lf
## careful with .gitignore
*.log text eol=lf
## careful with .gitignore
*.out text eol=lf
## careful with .gitignore
*.csv text eol=lf
## careful with .gitignore
.gitignore text eol=lf
.gitattributes text eol=lf
## Necessary muSoft-type files
## Denote all files that aren't binary, but which we don't want normalized
*.zip -text
*.pdf -text
*.docx -text
*.doc -text
*.rtf -text
*.xlsx -text
## Denote all files that are truly binary and should not be modified
*.dll binary
*.exe binary
*.pyc binary
## I haven't used any for the project, yet,
##+ but I think it's a good practice when
##+ someting might be run on Windows
## .gitignore should be set to keep out
##+ the __pycache__
#image files (we will have some in the repo)
*.png binary
*.jpg binary
#audio files (none yet in the repo)
#video files (none yet in the repo)
## diff stuff
##+ cf. ref1 = "https://web.archive.org/web/20240106163124/"\
##+"https://stackoverflow.com/questions/49549205/git-extension-and-xls"
##+ and also note that I got xdoc2txt.exe from
##+ ref2 = "https://github.com/VictorVG/FarUE3_x64/tree/master"
##+ more specifically,
##+ ref3 = "https://github.com/VictorVG/FarUE3_x64/blob/master/"\
##+"Far/xdoc2txt.exe"
##+ Retrieved 2024-01-06. Windows defender showed no threats.
##+ the readme.txt was in Russian. Luckily, I know some
##+ Russian.
## Basically, I added these next two uncommented lines here in
##+ .gitattributes ,
##+ then added the next two lines (actually pressing [Tab] where '\t')
##+[diff "excel"]
##+'\t'textconv = C:/David/my_repos_dwb/aws-udemy-pacing/xdoc2txt.exe
##+ to my .git/config
## This file is in this very repo, and can be extracted wherever needed.
*.xls diff=excel
*.xlsx diff=excel
## The following extensions exist on files inside the .git directory.
## I assume that, with the 'auto', git will take care of them.
# *.sample ; *.pack ; *.idx