-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
145 lines (126 loc) · 3.62 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
145
; vim: set ts=4 sw=4 sts=0 noexpandtab:
[core]
editor = vim
excludesfile = ~/.gitignore
quotepath = false
pager = git delta --tabs 2 --features "$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo dark-mode || echo light-mode)"
[color]
ui = true
diff = auto
status = auto
branch = auto
[gui]
recentrepo =
[grep]
lineNumber = true
;; brew install git-delta
;; delta is https://github.com/dandavison/delta
[delta]
navigate = true
line-numbers = true
#side-by-side = true
[delta "light-mode"]
;; $ delta --list-syntax-themes
light = true
syntax-theme = GitHub
[delta "dark-mode"]
light = false
syntax-theme = Visual Studio Dark+
[interactive]
diffFilter = git delta --color-only
[diff]
colorMoved = default
[pager]
#log = delta | less -RFXS
#reflog = delta
#diff = delta
#show = delta
grep = less --no-init --quit-if-one-screen
stash = false
[pull]
rebase = true
[merge]
tool = vimdiff
[alias]
co = checkout
cob = switch -c
ci = commit --verbose
cim = commit --verbose -m
default = !git show-ref --verify --quiet refs/heads/main && echo main || git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@' # Show default remote-branch
di = diff --ignore-space-change
dic = diff --cached --ignore-space-change
dim = !git diff --ignore-space-change origin/$(git default)
dis = diff --stat
br = branch --verbose
bra = branch --verbose --all
brd = branch --delete -vv
delta = !delta $(defaults read -g AppleInterfaceStyle &>/dev/null || echo --light)
fv = fetch --verbose --prune
hist = log --graph --pretty='format:%C(green)%h%C(black blue)%d%Creset %s %C(cyan)%ci%Creset %C(magenta ul)By %cn%Creset'
logpretty = log --decorate --graph --name-status --oneline
pf = push --force-with-lease --force-if-includes
pv = pull --verbose
rb = rebase --verbose
st = status
stv = status --verbose
wc = whatchanged
# tree (usage alias at .zshrc)
tree = ls-tree -r --name-only @
jump = !git checkout $(git branch | sed 's/*//g' | sed 's/ //g' | peco)
souji = !git branch --merged | grep -v -e '^[*]' -e "$(git default)" | xargs -r git branch -d
master = !git switch $(git default) && git fv && git rebase origin/$(git default) -v
today-numstat = !"f(){ \
git log \
--numstat \
--branches \
--no-merges \
--since=midnight \
--author=\"$(git config user.name)\" \
| awk 'NF==3 {a+=$1; d+=$2} END { \
printf(\"%d (\\x1b[32m+%d\\033[m, \\x1b[31m-%d\\033[m)\\n\", a+d, a, d)\
}'; \
};f"
q-numstat = !"f(){ \
git log \
--numstat \
--branches \
--no-merges \
--since=\"3 months ago\" \
--author=\"$(git config user.name)\" \
| awk 'NF==3 {a+=$1; d+=$2} END { \
printf(\"%d (\\x1b[32m+%d\\033[m, \\x1b[31m-%d\\033[m)\\n\", a+d, a, d)\
}'; \
};f"
[ghq]
root = ~/src
[color "diff-highlight"]
oldNormal = magenta bold
oldHighlight = magenta bold 52
newNormal = green bold
newHighlight = green bold 22
[color "diff"]
meta = 11
frag = cyan bold
func = 146 bold
commit = yellow bold
old = magenta bold
new = green bold
whitespace = magenta reverse
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
# user section should written on .gitsecret
#[user]
# name = nishigori
# email =
# NOTE: Enable when GitHub HTTPS protocal is gone (use SSH protocol)
#
#[url "https://"]
# insteadOf = git://
#
#[url "ssh://[email protected]/"]
# insteadOf = https://github.com/
[include]
path = ~/.secrets/.gitsecret