-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitconfig.common
103 lines (92 loc) · 3.77 KB
/
.gitconfig.common
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
# vim: set noet ts=2 sw=2 ft=gitconfig noet :
[alias]
# for typo
# ignore
# log graph
# safety http://d.hatena.ne.jp/thinca/20120924/1348491052
# stash
aa = add --all
ap = add --patch
br = branch
cancel = !git commit -a -m \"Temporary commit for cancel at `date`\" && git reset --hard HEAD~
cch= "!f() { git cherry -v "$@" | awk '{ if($1 == \"+\"){ color = \"green\" } if($1 == \"-\"){ color = \"red\" } cmd = \"git show --date=short --no-notes --pretty=format:\\047%C\" color $1 \" %h %Cgreen%cd %Creset%s\\047 --summary \" $2; cmd | getline t; close(cmd); print t }' ;}; f"
ci = commit --verbose
co = checkout
di = diff --color --color-words --find-renames --find-copies
dich = diff --cached --color-words --find-renames --find-copies
dimo = diff master origin/master
fe = fetch
glog = log --graph
ignore = update-index --assume-unchanged
ignored = !git ls-files -v | grep "^[a-z]"
lg = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)'
lg1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)'
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'
lg3 = log --graph --date-order -C -M --pretty=format:"<%h> %ad [%an] %Cgreen%d%Creset %s" --date=short
lg4 = log --graph --pretty='format:%C(yellow)%h%Cblue%d%Creset %s %C(black bold)%an, %ar%Creset'
logrep = log --grep
lp = log --patch
ls = log --stat --oneline
ls-untracked = ls-files --others --exclude-standard
me = merge
mt = mergetool
pl = pull
ps = push
pscb = push-current-branch
ra = rebase --abort
ranking = shortlog --summary --numbered --no-merges
rc = rebase --continue
ri = rebase --interactive
sh = show --color-words --find-renames --find-copies
shs = show --stat
st = status --branch --short
tree = "forest --pretty=format:\"%C(red)%h %C(blue)%an %C(reset)%s\" --style=15 --reverse"
tree = log --graph --pretty=oneline --abbrev-commit --decorate
unignore = update-index --no-assume-unchanged
z = stash
zl = stash list
zp = stash pop
zs = stash show
zsp = stash show -p
zz = stash save
[color]
branch = auto
diff = auto
grep = auto
interactive = auto
status = auto
ui = auto
[core]
# git での改行コード - http://qiita.com/shuhei@github/items/2da839de8803cb335f86
autocrlf = false
safecrlf = false
# ファイルモードの変更を毎回検出して UZZZeeee 問題 (cygwin)
# filemode = false
# マルチバイトなファイル名が化ける問題
quotepath = false
# editor = panty summon -w -r git -b ':cd '$PWD'<CR>'
# editor = panty summon --nofork --role git --after 'xmessage important "$PANTY_WINDOWID"'
# editor = panty summon --nofork --role git --after '/tmp/xmosh/imp "$PANTY_WINDOWID"'
editor = ~/bin/editor
excludesfile = ~/.gitignore
precomposeunicode = true # for Mac OS X - http://faithandbrave.hateblo.jp/entry/2016/02/08/144948
# [http]
# sslVerify = false
[i18n]
commitencoding = UTF-8
[merge]
ff = false
tool = meld
[pull]
rebase = preserve
[push]
default = simple # カレントブランチと同名のリモートブランチが存在する場合のみ、カレントブランチのpushが行われる - http://dqn.sakusakutto.jp/2012/10/git_push.html
[rerere]
enabled = true
[tig "bind"]
generic = g move-first-line
generic = G move-last-line
generic = <Ctrl-G> toggle-rev-graph
# Github の PullRequest を fetch できるようにする
# [remote "origin"]
# fetch = +refs/pull/*/head:refs/remotes/origin/pr/*