-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy path.gitconfig
109 lines (84 loc) · 3.11 KB
/
.gitconfig
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
[user]
email = LucasLarson@riseup.net
name = Lucas Larson
# signingKey
# use `git config --system user.signingKey 𝑥`
[core]
# macOS and Linux only per
# https://wildlyinaccurate.com/useful-git-configuration-items/#prevent-line-ending-issues
autocrlf = input
# editor set conditionally
# https://stackoverflow.com/a/14755066
editor = "if command -v nvim >/dev/null 2>&1; then EDITOR='nvim'; elif command -v vim >/dev/null 2>&1; then EDITOR='vim'; elif command -v vi >/dev/null 2>&1; then EDITOR='vi'; else EDITOR='nano'; fi; export EDITOR; $EDITOR"
excludesfile = ~/.gitignore_global
# aggressive but slow repo compression
# https://stackoverflow.com/a/28156806
# https://git-scm.com/docs/git-config/2.25.1#Documentation/git-config.txt-corecompression
compression = 9
looseCompression = 9
ignoreCase = false
# ensure Unicode filenames aren’t mangled by HFS
# https://chromium.googlesource.com/chromium/src/+/11eee6b/docs/mac_build_instructions.md#get-the-code
precomposeUnicode = true
# better diffs via the person from whom I learned to alias `apm-beta`
# https://github.com/jeefberkey/dotfiles/blob/b3513ad/.gitconfig#L11
pager = diff-so-fancy | less --tabs=4 -RFX
[color]
# changed from auto to true in 2020-04
# https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_bootstrapping_configuration
ui = true
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
[color "diff"]
meta = 11
frag = magenta bold
commit = yellow bold
old = red bold
new = green bold
whitespace = red reverse
[diff-so-fancy]
stripLeadingSymbols = false
[commit]
gpgsign = true
[credential]
# https://stackoverflow.com/a/59278535
helper = "!f() { if [ \"$(uname -s)\" = Linux ]; then git credential-cache --timeout 7889238 \"$@\"; else git credential-osxkeychain \"$@\"; fi; };f"
[diff "plist"]
# permit 𝚐𝚒𝚝 𝚍𝚒𝚏𝚏 even in binary 𝚙𝚕𝚒𝚜𝚝s
# https://www.programming-books.io/essential/git/diff-utf-16-encoded-text-and-binary-plist-files-b4b8d7c85497429ea2c7a18cca6a1c53
textconv = plutil -convert xml1 -o -
[diff "utf16"]
# macOS strings files
# https://www.programming-books.io/essential/git/diff-utf-16-encoded-text-and-binary-plist-files-b4b8d7c85497429ea2c7a18cca6a1c53
textconv = "iconv -f utf-16 -t utf-8"
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[gpg]
# `gpg` is an alias to `gpg2` where possible
# https://github.com/ustasb/dotfiles/commit/da93f0f
program = gpg
[i18n]
commitEncoding = utf-8
[init]
defaultBranch = main
[mergetool]
keepBackup = true
[pack]
# slow, aggressive compression
# https://git-scm.com/docs/git-config/2.25.1#Documentation/git-config.txt-corecompression
compression = 9
[pull]
rebase = true
[rerere]
# Git remembers your partial merge choices and replays them next time
# https://stackoverflow.com/a/28156806
autoUpdate = true
enabled = true
[tag]
forceSignAnnotated = true