-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy path.gitconfig
122 lines (103 loc) · 2.86 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
118
119
120
121
122
[alias]
# bread and butter
st = show --stat
s = status -sb
d = diff
dc = diff --cached
pff = pull --ff-only
p = pull
aa = add --all
ir = rebase -i origin/master
l = log --pretty=format:'%Cred%h%Creset %C(bold blue)<%an> -%C(yellow)%d%Creset %s %Cgreen(%cr) %Creset' --abbrev-commit --date=relative
lg = log -p
br = branch
co = checkout
ci = commit
amend = commit --amend
touch = commit --amend --reset-author --no-edit
undocommit = reset --soft HEAD^
undomerge-or-pull = reset --hard
my-changed-files = diff master..HEAD --name-only
# stats
who = shortlog -s -n
slap = blame -w #ignore whitespace
ignored = ls-files -i -o --exclude-standard
authors = !git log --format='%aN <%aE>' | sort -u
# stash
sl = stash list
sp = stash show -p
apply-stash-to-dirty-working-tree = !git stash show -p | git apply && git stash drop
g = grep --break --heading --line-number
### settings ###
[core]
whitespace=-blank-at-eol # disable leading whitespace highlighting
# whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol
editor = vim
excludesfile = ~/.gitignore
attributesfile = ~/.gitattributes
pager = delta
[rerere]
enabled = 1
[merge]
log = true
conflictstyle = diff3 #delta
[push]
default = simple
[pull]
rebase = true
[grep]
lineNumber = true
extendRegexp = true
[gist]
private = yes
browse = yes
# binary file diffing with strings, enable via .gitattributes
[diff "stringsdiff"]
textconv = strings
[diff "localizablestrings"]
textconv = "iconv -f utf-16 -t utf-8"
# Enable pretty diffing https://github.com/blog/2188-git-2-9-has-been-released
[diff]
compactionHeuristic=true
colorMoved = default
# https://gist.github.com/tekin/12500956bd56784728e490d8cef9cb81#gistcomment-3500150
[diff "rspec"]
xfuncname = "^[ \t]*((RSpec|describe|context|it|before|after|around|feature|scenario|background)[ \t].*)$"
### colors ###
[color]
branch = auto
diff = auto
status = auto
ui = true
[color "branch"]
current = green reverse
local = green
remote = yellow
[color "diff"]
meta = yellow
old = red bold
new = green bold
[color "status"]
added = green
changed = yellow
untracked = cyan
### personal ###
[user]
name = Matthias Luedtke
# email = # We use EMAIL instead
### local settings ###
[include]
path = local.gitconfig # may include additions and overrides
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[init]
defaultBranch = main
# https://github.com/dandavison/delta
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true # use n and N to move between diff sections
light = true # set to true if you're in a terminal w/ a light background color (e.g. the default macOS terminal)