-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
141 lines (117 loc) · 2.95 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
139
140
141
[user]
name = Denis Cornehl
email = denis@cornehl.org
[init]
defaultBranch = main
[core]
excludesfile = ~/.gitignore_global
editor = nvim
quotepath = false
trustExitCode = true
autocrlf = input
[pager]
diff = delta
difftool = true
log = delta
reflog = delta
show = delta
[blame]
date = short
[color]
branch = auto
diff = auto
interactive = auto
status = auto
ui = auto
[alias]
d = difftool
st = status -sb
ci = commit
co = checkout
di = diff
dc = diff --cached
puch = push
amend = commit --amend
aa = add --all
ff = merge --ff-only
pullff = pull --ff-only
noff = merge --no-ff
fa = fetch --all
pom = push origin master
b = branch
ds = diff --stat=160,120
dh1 = diff HEAD~1
# new aliases based on http://code.joejag.com/2013/everyday-git-aliases/
purr = pull --rebase
ready = rebase -i @{u}
wipe = reset --hard HEAD
ignored = ls-files --others -i --exclude-standard
# new aliases based on http://blog.apiaxle.com/post/handy-git-tips-to-stop-you-getting-fired/
assume = update-index --assume-unchanged
unassume = update-index --no-assume-unchanged
assumed = "!git ls-files -v | grep ^h | cut -c 3-"
snapshot = !git stash save "snapshot: $(date)" && git stash apply "stash@{0}"
# merging
ours = "!f() { git checkout --ours $@ && git add $@; }; f"
theirs = "!f() { git checkout --theirs $@ && git add $@; }; f"
# Fancy logging.
# h = head
# hp = head with patch
# r = recent commits, only current branch
# ra = recent commits, all reachable refs
# l = all commits, only current branch
# la = all commits, all reachable refs
head = !git l -1
h = !git head
hp = "!source ~/.githelpers && show_git_head"
r = !git l -30
ra = !git r --all
l = "!source ~/.githelpers && pretty_git_log"
la = !git l --all
graph = log --graph --oneline --all
# show different commits between branches
branchdiff = log --graph --left-right --cherry-pick --oneline
logline = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
conflicts = diff --name-only --diff-filter=U
[push]
default = current
followtags = true
[merge]
tool = nvim
; conflictstyle = diff3
[diff]
tool = difftastic
algorithm = histogram
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[difftool]
prompt = false
[difftool "difftastic"]
cmd = difft "$LOCAL" "$REMOTE"
[pull]
ff = only
[fetch]
prune = true
fsckobjects = true
; prunetags = true
[rebase]
updateRefs = true
missingCommitsCheck = error
[rerere]
enabled = true
[url "git@github.com:"]
; insteadOf = "https://github.com/"
insteadOf = "gh:"
[transfer]
fsckobjects = true
[receive]
fsckObjects = true
[branch]
sort = -committerdate
[tag]
sort = taggerdate
[log]
date = iso