-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
109 lines (88 loc) · 2.15 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
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
[user]
name = upinetree
email = [email protected]
[color]
ui = auto
[core]
excludesfile = ~/.gitignore
precomposeunicode = true
quotepath = false
editor = vim
pager = delta
[commit]
verbose = true
[fetch]
prune = true
[pull]
rebase = true
prune = true
[push]
default = current
autoSetupRemote = true
[rebase]
autostash = true # conflict がつらかったら外す
[merge]
conflictstyle = zdiff3
[branch]
sort = -committerdate
[credential]
helper = osxkeychain
[alias]
# branch manipulation
b = branch
co = checkout
sw = switch
main = "!git symbolic-ref refs/remotes/origin/HEAD | cut -d'/' -f4"
sync-main = "!git remote set-head origin --auto"
sm = "!git switch $(git main)"
f = fetch
fm = "!git fetch origin $(git main)"
fmr = "!git fm && git rebase origin/$(git main)"
p = pull
b-tidy = "!git branch --merged | grep -Ev '(master|main)' | xargs git branch -d"
# snapshotting
s = status -sbu
a = add -p
aa = "!git ls-files --modified --others --exclude-standard | fzf -m --preview '{ git diff {} | delta --color-only }' | xargs git add && git s"
ao = "!git ls-files --others --exclude-standard | fzf -m --preview '{ bat --style=numbers --color=always --line-range :500 {} }' | xargs git add && git s"
ci = commit
cm = commit -m
ca = commit --amend
can = commit --amend --no-edit
r = reset
res = restore
pop = stash pop
# sharing
pushf = push --force-with-lease
# inspection
df = diff --color
dfc = diff --color --cached
l = log --color --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
lg = l --graph
lga = lg --all
lm = l --merges
ls = log --stat
lp = log -p --color
sh = show --color
# github
open = "!gh repo view -w"
openpr = "!gh pr view -w"
[ghq]
# ghq.root: the last one becomes primary one.
root = ~/go/src
root = ~/repo
[pager]
branch = false
[interactive]
diffFilter = delta --color-only
[diff]
compactionHeuristic = true
colorMoved = default
algorithm = histogram
[delta]
plus-style = syntax auto
minus-style = syntax auto
syntax-theme = Dracula
navigate = true
[url "ssh://[email protected]/heyinc/"]
insteadOf = https://github.com/heyinc/