-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitconfig
executable file
·97 lines (93 loc) · 3.19 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
[core]
attributesfile = ~/.gitattributes
autocrlf = input # CRLFを自動変換
editor = nvim
excludesfile = ~/.gitignore # globalな.gitignoreの指定
filemode = false
precomposeunicode = true
quotepath = false
[color]
ui = auto
branch = auto
diff = auto
grep = auto
interactive = auto
status = auto
[push]
default = tracking
[pull]
ff = only
[diff]
mnemonicprefix = yes
patience = true
[http]
postBuffer = 524288000
[help]
autocorrect = 0
[alias]
ad = add
cam = commit -a --amend # 直前のcommitを修正
ci = commit -a # modifiedなファイルを全てstageへ
cm = commit
co = checkout
ft = fetch
rbm = rebase master # masterへのrebaseはよく使うのでalias
sh = show
so = remote show origin
st = status
stt = status -uno
up = pull --rebase # pull rebase
# branch関連
ba = branch -a # originも含めた全てのbranchを表示
bm = branch --merged # merge済みのbranchを表示
bn = branch --no-merged # mergeしてないbranchを表示
br = branch
# log関連
la = log --pretty=\"format:%ad %h (%an): %s\" --date=short # ざっくりログ出す
lp = log -p # diffも一緒に出す
lr = log origin # originのlog
ls = log --stat # logに変更されたファイルも一緒に出す
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に変更されたファイルも一緒に出す
# logをtree表示
# diff関連
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
dc = diff --cached # addされているものとのdiff
dm = diff master # masterとのdiff
ds = diff --staged # 同上(1.6.1移行)
dw = diff --color-words # 単語単位でいろつけてdiff
di = diff --word-diff
dn = diff --name-only
# mergeの際にconflictが起きたファイルを編集
edit-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; vim `f`"
# mergeの際にconflictが起きたファイルをadd
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'
[gpg]
program = /usr/bin/gpg
[user]
name = vankichi
email = "[email protected]"
signingkey = 4FFF395E80C47180
[ghq]
root = ~/go/src
[credential]
helper = store --file .git/credential
[commit]
gpgsign = true
[safe]
directory = /usr/local/flutter