-
Notifications
You must be signed in to change notification settings - Fork 3
/
gitconfig
117 lines (94 loc) · 3.28 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
110
111
112
113
114
115
116
117
; vim: set ft=gitconfig:
; few options are explained at:
; - https://jvns.ca/blog/2024/02/16/popular-git-config-options
; - https://www.youtube.com/watch?v=aolI_Rz0ZqY
[init]
defaultBranch = main
[column]
; use columns when it can
ui = auto
[commit]
verbose = true
[transfer]
fsckObjects = true
[push]
autoSetupRemote = true
[pull]
rebase = true
[rebase]
autoStash = true
[merge]
; include the original version before diverging
conflictStyle = zdiff3
[submodule]
recurse = true
[status]
submoduleSummary = 5 ; 5 means it will show up to 5 logs
; using -1 will mean it's infinite so it will show every log
[diff]
; https://luppeng.wordpress.com/2020/10/10/when-to-use-each-of-the-git-diff-algorithms/
algorithm = histogram
submodule = log
tool = difftastic
[difftool]
prompt = false
[difftool "difftastic"]
cmd = difft "$LOCAL" "$REMOTE"
[core]
pager = delta --detect-dark-light=never
; speeds up git status
fsmonitor = true
[pager]
difftool = true
[alias]
dft = difftool
[interactive]
diffFilter = delta --color-only --detect-dark-light=never
[delta]
features = line-numbers decorations
whitespace-error-style = 22 reverse
navigate = true ; use n and N to move between diff sections
[delta "decorations"]
commit-decoration-style = bold yellow box ul
file-style = bold yellow ul
file-decoration-style = none
[tig]
wrap-lines = yes
diff-highlight = yes ; use diff-highlight to highlight https://github.com/jonas/tig/issues/313
ignore-case = smart-case ; useful for search
main-view-id = yes ; show short hash - https://github.com/jonas/tig/issues/340#issuecomment-240764386
main-view-date-display = relative ; to have shorter date width
line-graphics = "utf-8"
; optimize colors under current limitation
[tig "color"]
; specify either 8 color like black white ... or 256 color
; 256 color might not work depends on TERM - read more on that here, https://github.com/jonas/tig/issues/559
; note that using black or white could result them to be reversed (inconsistency) depends on situations probably due to how my theme from base16-shell works
cursor = black cyan bold
commit = magenta black ; something like `commit h65hc6...`
title-blur = white black ; like the one from parent view - also for the vertical line...
title-focus = blue black reverse ; for the active view
diff-chunk = magenta black ; something like `@@ -25,7 +25,8 @@`
diff-index = yellow black ; something like `index e46e744..42dd3b1 100644`
diff-stat = blue black bold ; something like ` file | 1 +`
diff-header = blue black underline ; something like `diff --git a/file b/file`
diff-del-file = 60 224 ; something like `--- a/file`
diff-add-file = 36 194 ; something like `+++ b/file`
diff-add = 36 194
diff-del = 60 224
; to assist tig diff-view
[color "diff-highlight"]
oldNormal = "60 224"
oldHighlight = "66 217"
newNormal = "36 194"
newHighlight = "36 157"
; values above translated (and adjusted) from following - https://github.com/git/git/tree/5cc9858f1b470844dea5c5d3e936af183fdf2c68/contrib/diff-highlight
; using https://github.com/ryuheechul/hexto256
; ```
; # Varying background intensities
; [color "diff-highlight"]
; oldNormal = "black #f8cbcb"
; oldHighlight = "black #ffaaaa"
; newNormal = "black #cbeecb"
; newHighlight = "black #aaffaa"
; ```