-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
41 lines (32 loc) · 1.16 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
[user]
email = [email protected]
name = benlubas
[alias]
; lists the last 10 branches that I checked out (https://ses4j.github.io/2020/04/01/git-alias-recent-branches/)
lb = !git reflog show --pretty=format:'%gs ~ %gd' --date=relative | grep 'checkout:' | grep -oE '[^ ]+ ~ .*' | awk -F~ '!seen[$1]++' | head -n 10 | awk -F' ~ HEAD@{' '{printf(\" \\033[33m%s: \\033[37m %s\\033[0m\\n\", substr($2, 1, length($2)-1), $1)}'
todo = "!f() { git diff --name-only ${1-origin/main} | xargs rg TODO; }; f"
clean = "!git remote prune origin; git branch -vv | awk '/: gone]/' | cut -d' ' -f3 | xargs git branch -D"
[core]
excludesFile = ~/.gitignore
pager = delta
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true # use n and N to move between diff sections
light = false # set to true if you're in a terminal w/ a light background color (e.g. the default macOS terminal)
line-numbers = true
syntax-theme = Dracula
[push]
autoSetupUpstream = true
autoSetupRemote = true
[merge]
conflictstyle = diff3
tool = nvimdiff
[mergetool]
prompt = false
[diff]
colorMoved = default
[pull]
rebase = true
[init]
defaultBranch = main