-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathgitconfig
More file actions
executable file
·147 lines (124 loc) · 3.88 KB
/
gitconfig
File metadata and controls
executable file
·147 lines (124 loc) · 3.88 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
[core]
attributesfile = ~/.gitattributes
autocrlf = false
editor = "hx"
excludesfile = ~/.gitignore # global .gitignore path
fileMode = false
pager = unk diff
precomposeunicode = true
quotepath = false
[color]
ui = auto
branch = auto
diff = auto
grep = auto
interactive = auto
status = auto
[push]
default = tracking
autoSetupRemote = true
[pull]
rebase = true
ff = only
[diff]
mnemonicprefix = yes
patience = true
indentHeuristic = true
colorMoved = default
[http]
postBuffer = 524288000
cookiefile = ~/.gitcookies
[help]
autocorrect = 0
[alias]
ad = add
cam = commit -a --amend # amend the previous commit
ci = commit -a # stage all modified files and commit
cm = commit
co = checkout
ft = fetch
rbm = rebase main # alias for common rebase onto main
sh = show
so = remote show origin
st = status
stt = status -uno -u
up = pull --rebase # pull with rebase
# branch
ba = branch -a # show all branches including remote
bm = branch --merged # show merged branches
bn = branch --no-merged # show unmerged branches
br = branch
# log
la = log --pretty=\"format:%ad %h (%an): %s\" --date=short # compact log
lp = log -p # log with diff
lr = log origin # log of origin
ls = log --stat # log with changed files
lg = log --graph --date=short --decorate=short --pretty=format:'%Cgreen%h %Creset%cd %Cblue%cn %Cred%d %Creset%s'
lag = log --graph --all --color --pretty='%x09%h %cn%x09%s %Cred%d%Creset'
oneline = log --pretty=oneline
ranking = shortlog -s -n --no-merges
wc = whatchanged # log with changed files
# log tree view
# diff
d = diff -C --stat -p
d1 = diff HEAD~ # diff with 1 commit before HEAD
d2 = diff HEAD~~ # diff with 2 commits before HEAD
d3 = diff HEAD~~~ # diff with 3 commits before HEAD
d4 = diff HEAD~~~~ # diff with 4 commits before HEAD
d5 = diff HEAD~~~~~ # diff with 5 commits before HEAD
d10 = diff HEAD~~~~~~~~~~ # diff with 10 commits before HEAD
dc = diff --cached # diff of staged changes
dm = diff origin/main # diff against main
ds = diff --staged # same as dc (since 1.6.1)
dw = diff --color-words # diff by word
di = diff --word-diff
dn = diff --name-only
# edit files with merge conflicts
edit-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; vim `f`"
# add files with merge conflicts
add-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; git add `f`"
# grep
gr = grep
gn = grep -n
cp = cherry-pick
sp = stash pop
ss = stash save
tree = log --graph --pretty='format:%C(yellow)%h%Creset %s %Cgreen(%an)%Creset %Cred%d%Creset'
push-f = push --force-with-lease
undo = reset --soft HEAD^
[gpg]
program = gpg
[user]
name = kpango
email = kpango@vdaas.org
signingkey = 89013853239E4E9A
[ghq]
root = ~/go/src
[commit]
gpgsign = true
[tag]
gpgsign = true
[safe]
directory = ~/go/src/github.com/vdaas/vald
directory = ~/go/src/github.com/vdaas/vald-client-go
directory = ~/go/src/github.com/vdaas/vald-client-ci
directory = ~/go/src/github.com/kpango/glg
directory = ~/go/src/github.com/kpango/gache
directory = ~/go/src/github.com/kpango/dotfiles
[init]
defaultBranch = main
[url "https://github.com/"]
insteadOf = git@github.com
insteadOf = ssh://git@github.com/
[url "https://"]
insteadOf = git://
insteadOf = ssh://
[credential]
username = kpango
useHttpPath = true
[credential "https://github.com"]
helper =
helper = !gh auth git-credential
[credential "https://gist.github.com"]
helper =
helper = !gh auth git-credential