-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgitconfig
More file actions
189 lines (162 loc) · 4.67 KB
/
gitconfig
File metadata and controls
189 lines (162 loc) · 4.67 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
177
178
179
180
181
182
183
184
185
186
187
188
189
# https://blog.gitbutler.com/how-git-core-devs-configure-git/
# clearly makes git better
[column]
ui = auto
[branch]
sort = -committerdate
[tag]
sort = version:refname
[init]
defaultBranch = main
[diff]
external = difft
algorithm = histogram
colorMoved = plain
mnemonicPrefix = true
renames = true
[push]
default = simple
autoSetupRemote = true
followTags = true
[fetch]
prune = true
pruneTags = true
all = true
# why the hell not?
[help]
autocorrect = prompt
[commit]
verbose = true
[rerere]
enabled = true
autoupdate = true
[core]
excludesfile = ~/.gitignore
[rebase]
autoSquash = true
autoStash = true
updateRefs = true
# a matter of taste (uncomment if you dare)
[core]
fsmonitor = true
untrackedCache = true
[merge]
# (just 'diff3' if git version < 2.3)
conflictstyle = zdiff3
[pull]
rebase = true
# My customisations
[color]
ui = auto
branch = auto
diff = auto
interactive = auto
status = auto
[core]
editor = emacsclient -nw -c
# git will warn you of trailing whitespace at the end of a line
# as well as blank lines at the end of a file.
whitespace = warn
[merge]
ff = only
[status]
showUntrackedFiles = all
[user]
email = stephan@frozencherry.de
name = Stephan Schubert
username = stephanschubert
[url "git://github.com/"]
insteadOf = gh:
[alias]
branches = for-each-ref --sort=-committerdate --format=\"%(color:blue)%(authordate:relative)%09%(color:red)%(authorname)%09%(color:white)%(color:bold)%(refname:short)\" refs/remotes
last = log -1 HEAD
trash = reset HEAD --hard
unstage = reset HEAD --
commend = commit --amend --no-edit
fix = commit --amend
fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f"
git = !exec git
it = !git init && git commit -m "root" --allow-empty
merc = merge --no-ff
patch = !git --no-pager diff --no-color
please = push --force-with-lease
prune = fetch --prune
slap = log --oneline --decorate --graph --all
st = status --short --branch
staaash = stash --all
staash = stash --include-untracked
stash-all = stash save --include-untracked
stsh = stash --keep-index
tree = log --oneline --graph --decorate --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
undo = reset --soft HEAD^
# `git log` with patches shown with difftastic.
dl = -c diff.external=difft log -p --ext-diff
# Show the most recent commit with difftastic.
ds = -c diff.external=difft show --ext-diff
# `git diff` with difftastic.
dft = -c diff.external=difft diff
[github]
user = jazen
[core]
pager = delta
[interactive]
diffFilter = delta --color-only --features=interactive
# By default, you have to press enter after making your selection.
# However, it can be configured for single key presses. Add the following
# to your git configuration file to enable single key presses for interactive mode:
singlekey = true
[delta]
features = side-by-side unobstrusive-line-numbers decorations
syntax-theme = Dracula
colorMoved = default
# navigate = true
[delta "interactive"]
keep-plus-minus-markers = false
[delta "unobtrusive-line-numbers"]
line-numbers = true
line-numbers-minus-style = "#444444"
line-numbers-zero-style = "#444444"
line-numbers-plus-style = "#444444"
line-numbers-left-format = "{nm:>4}┊"
line-numbers-right-format = "{np:>4}│"
line-numbers-left-style = blue
line-numbers-right-style = blue
[delta "decorations"]
file-style = bold yellow ul
hunk-header-decoration-style = cyan box ul
commit-decoration-style = bold yellow box ul
commit-style = raw
file-decoration-style = none
# file-style = omit
# hunk-header-decoration-style = blue box
hunk-header-file-style = red
hunk-header-line-number-style = "#067a00"
hunk-header-style = file line-number syntax
[delta "line-numbers"]
line-numbers-left-style = "#444444"
line-numbers-right-style = "#444444"
line-numbers-minus-style = red
line-numbers-plus-style = green
[transfer]
fsckobjects = true
# To combat repository corruption!
# Note: this global option applies during receive and transmit
# https://git-scm.com/docs/git-config#git-config-transferfsckObjects
# via https://groups.google.com/forum/#!topic/binary-transparency/f-BI4o8HZW0
[magit]
hideCampaign = true
[magithub]
online = false
[magithub "status"]
includeStatusHeader = false
includePullRequestsSection = false
includeIssuesSection = false
[magithub "confirm"]
refreshWhenAPIUnresponsive = allow
[commit]
cleanup = strip
[filter "lfs"]
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process