-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdot_gitconfig
More file actions
176 lines (137 loc) · 5.19 KB
/
dot_gitconfig
File metadata and controls
176 lines (137 loc) · 5.19 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
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
[user]
name = Alex Wood
email = awood@redhat.com
signingkey = 298D1D5499779B18
[core]
excludesfile = ~/.gitignore
pager = delta --pager='ov -F'
[tag]
sort = version:refname
[pager]
# overload delta pager for some commands
show = delta --pager='ov -F --header 3' --features solarized-delta
# We are now overloading some commands via "delta features"
# This allows us to use different pager per git command
# It allows to maintain a simpler config file and avoid escaping quotes
diff = delta --features=\"solarized-delta ov-diff\"
log = delta --features=\"solarized-delta ov-log\"
# we define the delta feature "ov-diff" we are using for git diff
[delta "ov-diff"]
# the idea is to overload the pager used by delta when using git diff
# we are using the same pattern used by delta when the default pager (less) is used
# using ov section feature brings a better experience
pager=ov -F --section-delimiter '^\\[(\\+|C|M|\\-|=>)\\]' --section-header --pattern '•'
# we define the delta feature "ov-log" we are using for git log
[delta "ov-log"]
# the idea is to overload the pager used by delta when using git log
pager=ov -F --section-delimiter '^commit' --section-header-num 3
[interactive]
diffFilter = delta --color-only
[add.interactive]
useBuiltin = false # required for git 2.37.0
[delta]
features = solarized-delta
# use n and N to move between diff sections
navigate = true
light = false
[merge]
conflictstyle = zdiff3
[delta "solarized-delta"]
dark = true
syntax-theme = Solarized (dark)
line-numbers = true
keep-plus-minus-markers = false
file-style = "#839496" bold
file-decoration-style = "#586e75" ul
file-added-label = [+]
file-copied-label = [C]
file-modified-label = [M]
file-removed-label = [-]
file-renamed-label = [=>]
commit-decoration-style = bold box ul "#34fd50"
hunk-header-decoration-style =
hunk-header-line-number-style = "#586e75"
line-numbers-left-format = "{nm:>3} │"
line-numbers-left-style = "#586e75"
line-numbers-minus-style = "#dc322f"
line-numbers-right-format = "{np:>3} │"
line-numbers-right-style = "#586e75"
line-numbers-plus-style = "#859900"
line-numbers-zero-style = "#586e75"
minus-style = "#dc322f" "#93a1a1"
minus-emph-style = reverse "#dc322f" "#eee8d5"
plus-style = "#859900" "#fdf6e3"
plus-emph-style = reverse "#859900" "#073642"
zero-style = syntax
blame-code-style = syntax
blame-format = "{author:<10} ({commit:>8}) {timestamp:^12}"
blame-palette = "#002b36" "#073642" "#586e75" "#657b83" "#839496" "#93a1a1" "#eee8d5" "#fdf6e3"
merge-conflict-begin-symbol = ~
merge-conflict-end-symbol = ~
merge-conflict-ours-diff-header-style = "#b58900" bold
merge-conflict-ours-diff-header-decoration-style = "#586e75" ul ol
merge-conflict-theirs-diff-header-style = "#6c71c4" bold
merge-conflict-theirs-diff-header-decoration-style ="#586e75" ul ol
[diff]
colorMoved = default
mnemonicPrefix = true
renames = true
algorithm = histogram
tool = meld
[alias]
# Use like so: git compare my-branch...origin/main
compare = log --left-right --graph --cherry-pick --oneline
graph = log --graph --date-order -C -M --pretty=format:\"<%h> %ad [%an] %Cgreen%d%Creset %s\" --all --date=short
ctags = !.git/hooks/ctags
oldest-ancestor = !bash -c 'diff --old-line-format='' --new-line-format='' <(git rev-list --first-parent "${1:-master}") <(git rev-list --first-parent "${2:-HEAD}") | head -1' -
branchdiff = "!f() { head=${1:-HEAD} ; ancestor=`git oldest-ancestor master $head` ; git diff $ancestor..$head ; }; f"
visual-branchdiff = "!f() { head=${1:-HEAD} ; ancestor=`git oldest-ancestor master $head` ; git diff --name-only $ancestor..$head | xargs diffuse -s -r $ancestor ; }; f &"
edit-unmerged = "!f() { git diff --name-status --diff-filter=U | cut -f2 ; }; $EDITOR `f`"
add-unmerged = "!f() { git diff --name-status --diff-filter=U | cut -f2 ; }; git add `f`"
# Delete branches whose upstream branch is gone
gone = "!git branch -vv | grep 'gone]' | awk '{print $1}' | xargs git branch -D"
# Git prefixes your current branch with an asterisk so we don't want to delete that one
cleanup = "!git branch --merged main | grep -E -v '(^\\*|main)' | xargs -r -n 1 --verbose git branch -d"
bb = !better-git-branch.sh
praise = blame -w -M -C -C -C
pushfwl = push --force-with-lease
[sendemail]
smtpserver = smtp.corp.redhat.com
from = awood@redhat.com
[merge]
tool = meld
[init]
templatedir = ~/.git_template
defaultBranch = main
[fetch]
prune = true
pruneTags = true
all = true
[push]
default = upstream
autoSetupRemote = true
useForceIfIncludes = true
followTags = true
[branch]
autosetuprebase = always
sort = -committerdate
[http]
sslVerify = true
[cola]
spellcheck = false
tabwidth = 4
[help]
autocorrect = prompt
[commit]
gpgsign = true
[rh-pre-commit]
enableLocalConfig = false
checkSecrets = true
[rerere]
enabled = true
autoupdate = true
[column]
ui = auto
[rebase]
updateRefs = true
autosquash = true