-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
120 lines (108 loc) · 3.22 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
110
111
112
113
114
115
116
117
118
119
120
[user]
email = [email protected]
name = Peter Schilling
[color]
ui = auto
[alias]
a = add
aa = add --all
amend = commit --amend
b = branch
br = for-each-ref --count 20 --sort=-committerdate refs/heads/ --format='%(HEAD) %(color:green)%(refname:short)%(color:reset) - %(color:magenta)%(authorname)%(color:reset) (%(committerdate:relative)) %(objectname:short)'
bra = ! git remote prune origin && git for-each-ref --count 20 --sort=-committerdate refs/ --format='%(HEAD) %(color:green)%(refname:short)%(color:reset) - %(color:magenta)%(authorname)%(color:reset) (%(committerdate:relative))'
c = commit
ca = commit --all
cc = commit --allow-empty-message -m ''
cce = commit --allow-empty --allow-empty-message -m ''
cs = !aider --commit
current-branch = !sh -c 'git rev-parse --abbrev-ref HEAD' - # used by PS1
ft = "!f() { git switch -c $(echo $@ | sluggy); }; f"
cleanup = !branch-cleanup
conflicts = diff --name-only --diff-filter=U
# no origin/HEAD? fix it with this
update-origin = remote set-head origin -a
da = diff HEAD
dc = diff --cached
di = diff
me = log --author="peter"
ls = !git status --porcelain | sed s/^...//
s = status
sv = status -v -v
sw = switch
swf = !git switch $(git branch | fzf)
us = reset HEAD
fa = fetch --all
l = log
r = restore -s HEAD
ff = merge --ff-only
noff = merge --no-ff
today = !git log --format=summary \
--after $(date -v0M -v0S -v0H +%Y-%m-%dT%H:%M:%S%z)
yesterday = !git log --format=summary \
--after $(date -v -1d -v0M -v0S -v0H +%Y-%m-%dT%H:%M:%S%z) \
--before $(date -v0M -v0S -v0H +%Y-%m-%dT%H:%M:%S%z)
pull-please = !git pull --set-upstream origin $(git symbolic-ref --short HEAD)
default-branch = !git switch $(git rev-parse --abbrev-ref origin/HEAD | sed 's/^origin\\///')
sync-default-branch = remote set-head origin -a
sync = !git fetch origin $(default-branch):$(default-branch)
main = !git default-branch && git pull
open = !gh repo view --web
hs = log --pretty='%C(yellow)%h %C(cyan)%cd %Cblue%aN%C(auto)%d %Creset%s' --graph --date=format:'%a %Y-%m-%d' --date-order
res = restore
[push]
default = current
[diff]
algorithm = histogram
noprefix = true
; external = difft
[grep]
extendRegexp = true
lineNumber = true
[web]
browser = open
[merge]
tool = vimdiff
summary = true
conflictstyle = zdiff3
[core]
excludesfile = ~/.cvsignore
editor = vim
; editor = zed --new --wait
ignorecase = false
pager = delta --features "$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo dark-mode || echo light-mode)" --tabs 2
quotePath = false
precomposeunicode = true
[interactive]
diffFilter = delta --color-only
[delta]
features = line-numbers
line-numbers = false
[delta "light-mode"]
light = true
[delta "dark-mode"]
light = false
[pretty]
summary = - %C(yellow)%an%Creset %s
info = - %ad %C(yellow)%an%Creset %d %s
[diff "exif"]
textconv = exiftool
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[commit]
; gpgsign = true
verbose = true
[rerere]
enabled = true
[pull]
ff = only
[init]
defaultBranch = main
; [sequence]
; editor = interactive-rebase-tool
[status]
showUntrackedFiles = all
[includeIf "gitdir:~/tanooki/"]
path = ~/tanooki/.gitconfig-tanooki