-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.my.gitconfig
155 lines (130 loc) · 4.04 KB
/
.my.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
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# Some software overwrites my configuration without any notices (like boxen).
# It discourages to keep the portability so that I write a specific configurations
# in a separated ( this ) file.
[alias]
addu = add -u
amend = commit --amend
b = branch
branches = branch -a
cancel = !git commit -a -m 'Temporary commit for cancel' && git reset --hard HEAD~
cm = commit -v
co = checkout
df = diff
dfc = diff --cached
dfd = diff --word-diff
dfn = diff --name-only
dfr = diff --color-words --word-diff-regex='\\w+|[^[:space:]]'
dft = difftool
filelog = log -u
for = ! git foresta --all | less -RSX
fp = fetch --prune
fpp = fetch --prune --prune-tags
psh = push
pshf = push --force-with-lease
push-rm-tag = "!f(){ git push $1 :refs/tags/$2; }; f"
push-tags = "!f(){ git push $1 --tags; }; f"
rb = rebase
rbi = rebase -i
rbia = rebase -i --autosquash
reamend = commit --amend -C HEAD
remotes = remote -v
rs = restore
rss = restore --staged
sm = submodule
sst = status --short --branch
st = status
sw = switch
swc = switch -c
sync = "!sh -c 'git checkout --quiet --detach HEAD && \
git fetch origin main:main develop:develop ; \
git checkout --quiet -'"
sup = "submodule foreach \"git co master; git pull\""
unstage = reset HEAD
# show-branch = symbolic-ref --short HEAD
# aliases to referring log/history
graph = log --graph --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%aN>%Creset'
hist = log --graph --all --color --date=short --pretty=format:'%Cred%h%Creset %C(bold cyan)|%aN| %Creset%s%C(yellow)%d%Creset'
hist-b = log --graph --color --date=short --pretty=format:'%Cred%h%Creset %C(bold cyan)|%aN| %Creset%s%C(yellow)%d%Creset'
g = log -20 --graph --all --color --date=short --pretty=format:'%Cred%h%Creset %C(bold cyan)|%aN| %Creset%s%C(yellow)%d%Creset'
history = log --date=format:'%Y-%m-%d %H:%M:%S %z' --graph --abbrev-commit --decorate --format=format:'%C(bold red)%h%C(reset) - %C(bold cyan)|%aN|%C(reset) %C(white)%ad%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(bold white)%s%C(reset) %C(dim white)%C(reset)' --all
# use vimdiff
vd = difftool --tool=vimdiff --no-prompt
[color]
ui = true
[core]
# editor = vim
editor = nvim
quotepath = false
autocrlf = input
safecrlf = true
attributesfile = ~/.dotfiles/.gitattributes
precomposeunicode = true
preloadindex = true
excludesfile = ~/.gitignore_global
pager = delta
ignorecase = false
[delta]
navigate = true
light = false
side-by-side = true
plus-style = "syntax #012800"
minus-style = "syntax #340001"
syntax-theme = Monokai Extended
[diff]
algorithm = histogram
#algorithm = patience
# v2.9 -
#commpactionHeuristic = true
# v2.11 -
indentHeuristic = true
tool = difftastic
colorMoved = default
[merge]
conflictstyle = diff3
[diff "json"]
textconv = "perl -MJSON -0e \"print JSON->new->canonical->pretty->encode(decode_json(<>))\""
# exiftool should be installed
[diff "exif"]
textconv = "exiftool"
[difftool]
prompt = false
[difftool "difftastic"]
cmd = difft "$LOCAL" "$REMOTE"
[interactive]
# diffFilter = diff-highlight
diffFilter = delta --color-only
# [pager]
# log = "diff-highlight | less"
# show = "diff-highlight | less"
# diff = "diff-highlight | less"
# difftool = true
[pull]
# do not apply '--no-ff' while pull
ff = only
[push]
default = simple
[rebase]
autosquash = true
# http://git-scm.com/docs/git-rerere.html
# http://d.hatena.ne.jp/unpush/20091010/1255186302
[rerere]
enabled = true
[ghq]
root = ~/local/src
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge --skip -- %f
process = git-lfs filter-process --skip
required = true
[url "ssh://[email protected]"]
insteadOf = https://github.com
[credential]
helper = cache
[init]
defaultBranch = main
## Examples
#
#[url "[email protected]:"]
# pushinsteadof = "git://github.com/"
# pushinsteadof = "https://github.com/"
# vim: ft=gitconfig sw=2 ts=2