-
Notifications
You must be signed in to change notification settings - Fork 8
/
gitconfig
100 lines (100 loc) · 1.99 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
[user]
name = rhysd
email = [email protected]
[core]
editor = vim
excludesfile = ~/.global.gitignore
[color]
ui = true
[alias]
ad = add
adp = add -p
adu = add -u :/
bl = blame
br = branch -vv
checkout-pr = "!f(){ \
set -e;\
if [ -z \"$1\" ]; then\
echo 'Usage: git checkout-pr {PR number}' 1>&2;\
exit 1;\
fi;\
git fetch origin \"pull/$1/head:pr-$1\";\
git checkout \"pr-$1\";\
};f"
cl = clone
cm = commit -v
cma = commit -v --amend
cmf = commit --fixup
cmm = commit -m
co = checkout
sw = switch
swc = switch -c
cob = switch -c
copr = checkout-pr
delete-branch = "!f(){\
set -e;\
if [ -z \"$1\" ]; then\
echo 'Usage: git delete-branch [REMOTE] BRANCH' 1>&2;\
exit 1;\
fi;\
if [ -z \"$2\" ]; then\
git push origin --delete \"$1\" --no-verify;\
git branch -D \"$1\";\
else\
git push \"$1\" --delete \"$2\" --no-verify;\
git branch -D \"$2\";\
fi;\
};f"
delta = -c core.pager=delta -c delta.navigate=true diff
db = delete-branch
di = diff
dic = diff --cached
dis = diff --stat
diu = diff --diff-filter=U
gr = grep
lo = log --graph --pretty=format:'%C(Yellow)%h %C(Cyan)%ad %C(White)%s%C(Green)%d %C(Red)[%an]' --date=short
lop = log -p
lsf = ls-files
mg = merge
mga = merge --abort
mgn = merge --no-ff
pl = pull
plr = pull --rebase
ps = push
pushf = push --force-with-lease
pr = brws --pr
rb = rebase
rba = rebase --abort
rbc = rebase --continue
rbi = rebase -i
re = remote
rmc = rm --cached
rmr = rm -r
rmrc = rm -r --cached
st = status -sb
[diff]
compactionHeuristic = true
[push]
default = simple
[github]
user = rhysd
[ghq]
root = ~/Develop
[tig]
main-view-date = custom
main-view-date-format = "%Y-%m-%d"
[tig "bind"]
generic = <Ctrl-f> scroll-page-down
generic = <Ctrl-b> scroll-page-up
[pager]
diff = diff-highlight | less
[interactive]
difffilter = diff-highlight
[pull]
rebase = false
[merge]
conflictstyle = diff3
[init]
defaultBranch = main
[include]
path = .gitconfig.local