-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitconfig
138 lines (119 loc) · 2.91 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
[user]
name = Denis Tuzhik
email = dev@dentuzhik.com
[core]
editor = nvim
whitespace = -l
autocrlf = input
excludesfile = ~/.gitignore
# Make `git rebase` safer on OS X
# More info: <http://www.git-tower.com/blog/make-git-rebase-safe-on-osx/>
trustctime = false
commentChar = %
[credential]
helper = cache --timeout=28800
[color]
ui = true
diff = true
branch = true
status = true
pager = true
interactive = true
[interactive]
singlekey = true
[help]
autocorrect = 1
[apply]
whitespace = fix
[pager]
log = diff-highlight | less
show = diff-highlight | less
diff = diff-highlight | less
[diff]
tool = vimdiff
compactionHeuristic = true
[merge]
log = true
tool = vimdiff
[push]
default = current
[rebase]
autostash = true
[stash]
showPatch = true
[alias]
cf = config
l = log --oneline --graph --decorate
lp = log -p --relative-date
ll = !git lp -1
a = add
aa = add -A
rs = reset
rss = reset --soft
rsh = reset --hard
cln = clean -fdx
pu = push
puf = push -f
pus = !sh -c 'git push origin -u ${1-"$(git rev-parse --abbrev-ref HEAD)"}'
# Short format with branch info
s = status -sb
st = status
di = diff --color
dc = diff --color --cached
co = checkout
cb = checkout -b
ci = commit
cim = commit -m
# Add everything, then commit
cia = "!f() { git add -A; if [ -z \"$1\" ]; then git commit; else git commit -m \"$1\"; fi }; f"
ca = commit --amend
caa = "!f() { git add -A; git commit --amend; }; f"
cah = "!f() { git add -A; git commit --amend -C 'HEAD'; }; f"
# Ammend commit author, with useful defaults
cau = "!f() { git commit --amend --author \"${1-`git config user.name`} <${2-`git config user.email`}>\" -C HEAD; }; f"
br = branch
brs = branch -a
sut = branch --set-upstream-to
sup = !sh -c 'git branch --set-upstream-to origin/${1-"$(git rev-parse --abbrev-ref HEAD)"}'
tgs = tag -l
rv = remote -v
rb = rebase
rbi = "!r() { git rebase -i HEAD~${1-5}; }; r"
# Add all, then rebase continue
arc = !git add -A && git rebase --continue
team = shortlog --summary --numbered
sha = show --pretty=format:%h --no-patch
show-merge = "!f() { git show $(git rev-list $1...HEAD --merges --topo-order | tail -1); }; f"
# URL shorthands
[url "git@github.com:"]
insteadOf = "gh:"
pushInsteadOf = "github:"
pushInsteadOf = "git://github.com/"
pushInsteadOf = "https://github.com/"
[url "git://github.com/"]
insteadOf = "github:"
[url "git@gitlab.com:"]
insteadOf = "gl:"
pushInsteadOf = "gitlab:"
pushInsteadOf = "git://gitlab.com/"
pushInsteadOf = "https://gitlab.com/"
[url "git://gitlab.com/"]
insteadOf = "gitlab:"
[filter "lfs"]
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
[lfs]
batch = true
concurrenttransfers = 15
[hub]
protocol = ssh
[github]
user = dentuzhik
[ghi]
token = !security find-internet-password -a dentuzhik -s github.com -l 'ghi token' -w
[pull]
rebase = true
[fetch]
prune = true