-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitconfig
41 lines (40 loc) · 1.23 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
[alias]
history = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
delete-merged-branches = "!git branch --merged | grep -E -v '(^\\*|master|main|dev|staging|stg|release)' | xargs git branch -d"
[branch]
sort = -committerdate
[diff]
colorMoved = default
submodule = log
[fetch]
# リモートで削除されたブランチはローカルも削除
prune = true
prunetags = true
[init]
defaultBranch = main
[log]
date = iso
[pager]
# macOS の場合は brew の git に含まれている diff-highlight に PATH を通す必要がある。
# ln -s $(brew --prefix)/opt/git/share/git-core/contrib/diff-highlight/diff-highlight /usr/local/bin/
log = diff-highlight | less
show = diff-highlight | less
diff = diff-highlight | less
[push]
# fetch した commit がローカルに取り込まれた場合のみ force push 可
useForceIfIncludes = true
[pull]
# fast-forward のみ許可
ff = only
[rebase]
# rebase 時に現在の変更を stash する
autostash = true
[rerere]
# コンフリクトの解消を記憶して再利用する
enabled = true
[status]
submoduleSummary = true
[submodule]
recurse = true
[tag]
sort = -version:refname