-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitconfig
58 lines (58 loc) · 1.82 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
[core]
editor = "nano"
excludesfile = ~/.gitignore_global
[user]
name = ryosan-470
email = rskjtwp@gmail.com
signingkey = 60C13C7737C6E4D0707828B19E53E96EAD309F72
[commit]
gpgsign = true
[color]
ui = auto
status = auto
diff = auto
branch = auto
interactive = auto
grep = auto
[push]
default = tracking
[include]
path = ~/.gitconfig.local
[alias]
b = branch -a
branches = branch -a # ブランチの一覧
c = commit
stashes = stash list # stash した一覧
unstage = reset -q HEAD --
discard = checkout --
uncommit = reset --mixed HEAD~
amend = commit --amend
nevermind = !git reset --hard HEAD && git clean -d -f
# リアルタイムのタイムラインを見ることができる
precommit = diff --cached --diff-algorithm=minimal -w
last = log -1 HEAD --format=format:"%Cred%H"
untrack = rm -r --cached
mergetrail = log --ancestry-path --merges
l = log --graph --date=short --pretty=format:'%C(red reverse)%d%Creset%C(white reverse) %h% Creset %C(green reverse) %an %Creset %C(cyan)%ai%Creset%n%C(white bold)%w(80)%s%Creset%n%n%w(80,2,2)%b'
hash = rev-parse HEAD
p = !git push origin `git rev-parse --abbrev-ref HEAD`
pf = !git push origin `git rev-parse --abbrev-ref HEAD` --force-with-lease
delete-merged-branch = !git branch --merged | grep -v \\* | grep -v master | xargs -I % git branch -d %
# blameしてそのコミットが含まれるPR番号を教えてくれます
ag = "!git ls-files | xargs ag --pager=\"less -F -R\" --nogroup --color-match=0\\;31 --color-path=0\\;0 --no-numbers"
[commit]
template = ~/.dotconfig/dotfiles/.git_commit_template.txt
[grep]
lineNumber = true
[pager]
log = diff-highlight | less
show = diff-highlight | less
diff = diff-highlight | less
[interactive]
diffFilter = diff-highlight
[diff]
compactionHeuristic = true
[ghq]
root = ~/code/src
[pull]
rebase = false