-
Notifications
You must be signed in to change notification settings - Fork 4
/
.gitconfig
79 lines (79 loc) · 2.26 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
[user]
name = deris
email = [email protected]
[core]
pager = lv -c
editor = vim
excludesfile = ~/.gitignore
autocrlf = input
quotepath = false
[color]
ui = auto
status = auto
diff = auto
branch = auto
interactive = auto
grep = auto
[merge]
keepBackup = false
[alias]
s = status -s -b
st = status
sh = show
ss = stash
so = remote show origin
ft = fetch
up = pull --rebase # pull rebase
rbm = rebase master # masterへのrebaseはよく使うのでalias
a = add
ad = add
ap = add -p
c = commit
cm = commit -m
ci = commit -a # modifiedなファイルを全てstageへ
cam = commit --amend # 直前のcommitを修正
co = checkout
# branch関連
br = branch
ba = branch -a # originも含めた全てのbranchを表示
bm = branch --merged # merge済みのbranchを表示
bn = branch --no-merged # mergeしてないbranchを表示
# log関連
wc = whatchanged # logに変更されたファイルも一緒に出す
ls = log --stat # logに変更されたファイルも一緒に出す
lp = log -p # diffも一緒に出す
la = log --pretty=\"format:%ad %h (%an): %s\" --date=short # ざっくりログ出す
lr = log origin # originのlog
oneline = log --pretty=oneline
ranking = shortlog -s -n --no-merges
# logをtree表示
log-graph = log --graph --date=short --pretty=format:'%Cgreen%h %cd %Cblue%cn %Creset%s'
log-all = log --graph --all --color --pretty='%x09%h %cn%x09%s %Cred%d%Creset'
# diff関連
d = diff
dm = diff master # masterとのdiff
dw = diff --color-words # 単語単位でいろつけてdiff
dc = diff --cached # addされているものとのdiff
ds = diff --staged # 同上(1.6.1移行)
d1 = diff HEAD~ # HEADから1つ前とdiff
d2 = diff HEAD~~ # HEADから2つ前とdiff
d3 = diff HEAD~~~ # HEADから3つ前とdiff
d4 = diff HEAD~~~~ # HEADから4つ前とdiff
d5 = diff HEAD~~~~~ # HEADから5つ前とdiff
d10 = diff HEAD~~~~~~~~~~ # HEADから10前とdiff
# grep関連
g = grep
gr = grep
gn = grep -n
[github]
user = deris
[push]
default = current
[grep]
extendedRegexp = true
[pull]
rebase = true
[branch]
autosetuprebase = always
[http]
postBuffer = 524288000