-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitconfig
144 lines (124 loc) · 3.92 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
142
143
144
# Global Config
[user]
name = "Mikael Knutsson"
email = "[email protected]"
signingkey = 12FCD537602EC268
#signingkey = **Your GPG ID**
[branch "master"]
remote = origin
merge = refs/heads/master
[color]
branch = always
diff = always
grep = always
interactive = always
pager = true
showbranch = auto
status = auto
ui = always
[color "interactive"]
error = red bold
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow
frag = magenta
old = red
new = green
whitespace = white reverse
[color "status"]
added = yellow
changed = green
untracked = cyan
branch = magenta
[core]
pager = less -FRSX
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
[diff]
tool = vimdiff
[difftool]
prompt = false
[merge]
tool = vimdiff3
[alias]
# branch
b = branch
bc = checkout -b
bl = branch -v
bL = branch -av
bx = branch -d
bX = branch -D
bm = branch -m
bM = branch -M
bs = show-branch
bS = show-branch -a
# checkout/fetch/merge/push/rebase
# checkout
co = checkout
co0 = checkout HEAD --
# fetch
f = fetch
fm = pull
fo = fetch origin
# merge
m = merge
mom = merge origin/master
# push
p = push
pa = push --all
pt = push --tags
# rebase
r = rebase
ra = rebase --abort
rc = rebase --continue
ri = rebase --interactive
rs = rebase --skip
rom = rebase origin/master
# commit
c = commit -v
ca = commit --all -v
cm = commit --message
cam = commit --all --message
camend = commit --amend --reuse-message HEAD
cundo = reset --soft "HEAD^"
cp = cherry-pick
# diff
d = diff # Diff working dir to index
ds = diff --staged # Diff index to HEAD
dc = diff --staged # Diff index to HEAD
dh = diff HEAD # Diff working dir and index to HEAD
hub = browse
hubd = compare
# index
s = status
a = add
ia = add
ir = reset
# log
l = log --topo-order --pretty=format:'%C(yellow)%h %C(cyan)%cn %C(blue)%cr%C(reset) %s'
ls = log --topo-order --stat --pretty=format:'%C(bold)%C(yellow)Commit:%C(reset) %C(yellow)%H%C(red)%d%n%C(bold)%C(yellow)Author:%C(reset) %C(cyan)%an <%ae>%n%C(bold)%C(yellow)Date:%C(reset) %C(blue)%ai (%ar)%C(reset)%n%+B'
ld = log --topo-order --stat --patch --full-diff --pretty=format:'%C(bold)%C(yellow)Commit:%C(reset) %C(yellow)%H%C(red)%d%n%C(bold)%C(yellow)Author:%C(reset) %C(cyan)%an <%ae>%n%C(bold)%C(yellow)Date:%C(reset) %C(blue)%ai (%ar)%C(reset)%n%+B'
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
lga = log --topo-order --all --graph --pretty=format:'%C(yellow)%h %C(cyan)%cn%C(reset) %s %C(red)%d%C(reset)%n'
lm = log --topo-order --pretty=format:'%s'
lh = shortlog --summary --numbered
llf = fsck --lost-found
lg1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
# remote
re = remote
rel = remote --verbose
rea = remote add
rex = remote rm
rem = remote rename
rmb = "!f() { git branch --merged | grep -v "master" | while read i; do git branch -d $i; done; }; f"
[push]
default = matching
[url "[email protected]:"]
insteadof = github:
[url "ssh://[email protected]:12888/"]
insteadOf = https://git.easygroup.co/
[diff "sopsdiffer"]
textconv = sops -d