-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
60 lines (60 loc) · 1.63 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
# This is Git's per-user configuration file.
[core]
# Please adapt and uncomment the following lines:
pager = less -x2
autocrlf = input
quotepath = false
[color]
ui = auto
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[alias]
# イシュー番号に紐付いたコミット
ic = "!f () {\
b=`git s | head -n 1 | cut -d '_' -f2`;\
git commit -m \"refs ${b} / $1\";\
}; f"
# イシュー番号に紐付いたブランチ
ib = "!f () {\
if [ $1 = '-r' ]; then\
lb=issue_#${2};\
rb=origin/issue_#${2};\
else\
lb=issue_#${1};\
rb='';\
fi;\
git ch -b ${lb} ${rb};\
}; f"
a = add
b = branch
bc = git checkout $(git branch | peco)
c = commit
cma = commit -a -m
cancel = reset --soft HEAD^
ch = checkout
chb = checkout -b
cm = commit -m
diff = diff --word-diff
pl = pull
ps = push -u
push = push -u
f = fetch
l = log --graph --date=short --decorate=short --pretty=format:'%Cgreen%h %Creset%cd %Cblue%cn %Cred%d %Creset%s'
s = status
today = log --oneline --since='12 hour ago'
pretty = log --pretty=oneline -10
current-branch = ! git symbolic-ref HEAD | sed 's/refs\\/heads\\///'
pull-force = ! git reset --hard origin/$(git current-branch)
branch-select = ! git branch -a | sed 's/^*/ /' | peco
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
required = true
[commit]
process = git-lfs filter-process
[merge]
tool = vimdiff