-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
31 lines (31 loc) · 960 Bytes
/
.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
[core]
excludesfile = ~/.gitignore_global
[color]
ui = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold # line info
old = red # deletions
new = green # additions
[color "status"]
added = yellow
changed = green
untracked = cyan
[alias]
subup = submodule update --init --recursive
st = status
co = checkout
rhead = reset --hard HEAD
gr = log --graph --decorate
gro = log --graph --decorate --oneline
grs = log --graph --decorate --pretty=format:'%Cgreen%h %Cred%an%Creset %s %Cblue%d'
# 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)}'
[push]
default = simple
[init]
defaultBranch = main