-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitconfig
208 lines (159 loc) · 5.34 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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
[user]
autocrlf = false
name = mainyaa
email = mainya@gmail.com
[alias]
co = checkout
ci = commit
st = status
br = branch
[pull]
# from 1.7.9
rebase = true
[core]
editor = /usr/bin/vim
excludesfile = /Users/kazuyukimori/.gitignore_global
[browse-remote "github.com"]
top = https://{host}/{path}
ref = https://{host}/{path}/tree/{short_ref}
rev = https://{host}/{path}/commit/{commit}
[browse-remote "redmine.ne.jp"]
top = https://{host}/{path}
ref = https://{host}/{path}/tree/{short_ref}
rev = https://{host}/{path}/commit/{commit}
[web]
browser = open
[interactive]
singlekey = true
diffFilter = diff-highlight
[github.com]
username = mainyaa
[color]
ui = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan
[branch]
autosetuprebase = always
[push]
default = tracking
[alias]
# add
a = add # add
chunkyadd = add --patch # stage commits chunk by chunk
# branch
b = branch -v # branch (verbose)
# commit
c = commit -m # commit with message
ca = commit -am # commit all with message
ci = commit # commit
amend = commit --amend # ammend your last commit
ammend = commit --amend # ammend your last commit
# checkout
co = checkout # checkout
nb = checkout -b # create and switch to a new branch (mnemonic: "git new branch branchname...")
# cherry-pick
cp = cherry-pick -x # grab a change from a branch
# diff
d = diff # diff unstaged changes
dc = diff --cached # diff staged changes
di = diff # diff unstaged changes
dic = diff --cached # diff staged changes
last = diff HEAD^ # diff last committed change
# log
l = log --graph -n 20 --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %s %C(green)- %an, %cr%Creset'
ll = log --stat --abbrev-commit
ln = log --graph -n 20 --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %s %C(green)- %an, %cr%Creset' --name-status
lp = log --oneline -n 20 -p
ls = log --stat --abbrev-commit -n 1 # display previous log
changes = log --pretty=format:\"%h %cr %cn %Cgreen%s%Creset\" --name-status
short = log --pretty=format:\"%h %cr %cn %Cgreen%s%Creset\"
changelog = log --pretty=format:\" * %s\"
shortnocolor = log --pretty=format:\"%h %cr %cn %s\"
hist = log --pretty=format:\\\"%h %ad | %s%d [%an]\\\" --graph --date=short
# pull
pl = pull # pull
# push
ps = push # push
# rebase
rc = rebase --continue # continue rebase
rs = rebase --skip # skip rebase
# remote
r = remote -v # show remotes (verbose)
# reset
unstage = reset HEAD # remove files from index (tracking)
uncommit = reset --soft HEAD^ # go back before last commit, with files in uncommitted state
filelog = log -u # show changes to a file
mt = mergetool # fire up the merge tool
# stash
ss = stash # stash changes
sl = stash list # list stashes
sa = stash apply # apply stash (restore changes)
sd = stash drop # drop stashes (destory changes)
# status
s = status --short --branch # status
st = status # status
stat = status # status
# tag
t = tag -n # show tags with <n> lines of each tag message
lastday = log --author="mainyaa" --pretty=oneline --all --since='1 days ago'
lastfriday = log --author="mainyaa" --pretty=oneline --all --since='1 weeks ago'
# svn helpers
svnr = svn rebase
svnd = svn dcommit
svnl = svn log --oneline --show-commit
[format]
pretty = format:%C(blue)%ad%Creset %C(yellow)%h%C(green)%d%Creset %C(blue)%s %C(magenta) [%an]%Creset
[merge]
summary = true
verbosity = 1
ff = false
conflictstyle = diff3
[branch]
autosetupmerge = true
[apply]
whitespace = nowarn
[push]
# 'git push' will push the current branch to its tracking branch
# the usual default is to push all branches
default = tracking
[diff]
# Git diff will use (i)ndex, (w)ork tree, (c)ommit and (o)bject
# instead of a/b/c/d as prefixes for patches
mnemonicprefix = true
compactionHeuristic = true
[rerere]
# Remember my merges
# http://gitfu.wordpress.com/2008/04/20/git-rerere-rereremember-what-you-did-last-time/
enabled = true
[help]
autocorrect = 1
[ghq]
root = ~/.ghq
root = ~/.go/src
[init]
templatedir = ~/.git_template
[filter "media"]
clean = git-media-clean %f
smudge = git-media-smudge %f
[filter "lfs"]
clean = git-lfs clean %f
smudge = git-lfs smudge %f
required = true
[http]
cookiefile = /Users/kazuyukimori/.gitcookies
# from 1.7.10
#[include]
# path = .gitconfig_linux
[include]
path = .gitconfig_mac