-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgit_globalconfig
More file actions
124 lines (110 loc) · 2.65 KB
/
git_globalconfig
File metadata and controls
124 lines (110 loc) · 2.65 KB
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
#[user]
# ~/.gitconfig.local に書く
[include]
# ex-> github token ...
path = .gitconfig.local
[color]
status = auto
diff = auto
branch = auto
interactive = auto
grep = auto
[core]
editor = nvim
excludesfile = ~/.gitignore
pager = less
autocrlf = false
[grep]
lineNumber = true
[log]
decorate = true
[push]
default = upstream
[commit]
template = ~/.gitmsgtemplate.txt
[pager]
log = (diff-highlight 2>/dev/null || cat) | ${PAGER:-less}
show = (diff-highlight 2>/dev/null || cat) | ${PAGER:-less}
diff = (diff-highlight 2>/dev/null || cat) | ${PAGER:-less}
[interactive]
diffFilter = (diff-highlight 2>/dev/null || cat)
[diff]
compactionHeuristic = true
[diff "sqlite3"]
textconv = echo .dump|sqlite3
[alias]
# common
st = status
sh = show
ft = fetch
ad = add
cm = commit -v
# branch
br = branch
ba = branch -a
bmd = branch --merged
bnm = branch --no-merged
# checkout
co = "!f () {\
if [ $# -eq 0 ]; then\
git checkout `git branch | fzf`;\
elif [ $# -ge 1 ]; then\
git checkout ${@};\
fi;\
};f"
# to operate branch
rmbr = branch -d
mkbr = checkout -b
# reset
re = reset
rehar = reset --hard
res = reset --soft
# rebase
rb = rebase
rbom = rebase origin/master
rbum = rebase upstream/master
# merge
merege = merge
mg = merge
mgom = rebase origin/master
mgum = rebase upstream/master
#diff
dm = diff master
dw = diff --color-words
dca = diff --cached
d1 = diff HEAD~
d2 = diff HEAD~~
d3 = diff HEAD~~~
d4 = diff HEAD~~~~
d5 = diff HEAD~~~~~
#http://qiita.com/items/3fcd60e063f26e90321d
gr = grep -HI --color --heading --break
grn = grep -n
#http://qiita.com/items/2b9d9560381bbe316818
tref = for-each-ref --sort=-taggerdate --format='%(taggerdate:short) %(tag) %(taggername) %(subject)' refs/tags
# pull
plmas = pull --rebase origin master
# submodule
subm = submodule
# update all submodules
subup = "submodule foreach 'git checkout master; git pull --rebase'"
# stash
sth = stash
pop = stash pop
shl = stash list
# utils
showremote = remote -v
info = config --list
hist = log --pretty=format:\"%C(yellow)%h %C(White)%ad | %C(White)%s%C(Green)%d %C(Red)[%an]\" --graph --date=short --decorate=full
chspace = diff --check
chbr = !git checkout $(git branch | fzf)
edit = "!f () { mvim $1; }; f"
# plugins
[ghq]
root = ~/.ghq/src
root = ~/.go/src
[init]
defaultBranch = main
[user]
name = Ogura Daiki
email = 8hachibee125@gmail.com