Files
dotfiles/git/gitconfig
2026-03-07 18:46:03 -07:00

85 lines
2.6 KiB
Plaintext

# be sure to install delta and vim
[user]
[init]
defaultBranch = main
[core]
pager = delta
editor=vim
[diff]
[color]
ui = auto
[merge]
tool = vimdiff
ff = true
[push]
default = current
followTags = true
[branch]
autosetuprebase = always
[rebase]
autosquash = true
[alias]
st = status
bi = bisect
ci = commit
co = checkout
fu = commit --fixup
cp = cherry-pick
di = diff
dc = diff --cached
amend = commit --amend
aa = add --all
ff = merge --ff-only
pullff = pull --ff-only
noff = merge --no-ff
div = divergence
gn = goodness
gnc = goodness --cached
fa = fetch --all
pom = push origin master
b = "!git for-each-ref --sort=-committerdate refs/heads --format='%(authordate:short) %(color:red)%(objectname:short) %(color:yellow)%(refname:short)%(color:reset) (%(color:green)%(committerdate:relative)%(color:reset))'"
ll = log --pretty='%C(yellow)%h %C(cyan)%cd %Cblue%aN%C(auto)%d %Creset%s' --graph --date=relative --topo-order --decorate
ds = diff --stat=160,120
dh1 = diff HEAD~1
head = !git l -1
h = !git head
hs = !git head --show-signature
r = !git l -30
ra = !git r --all
rs = !git log --oneline --show-signature
l = "!. ~/.githelpers && pretty_git_log"
la = !git l --all
sync = "!. ~/.githelpers && sync_to_remote"
bsync = "!. ~/.githelpers && update_branch"
bp = !git backport
backport = "!. ~/.githelpers && backport_pr"
track = "!. ~/.githelpers && track_remote"
sign = "!git commit -S --amend --no-edit"
todo = grep --heading --break --ignore-case -e ' FIX: *' -e ' TODO: *'
pr = "!. ~/.githelpers && get_pr"
prx = "!. ~/.githelpers && del_pr"
brx = "!. ~/.githelpers && clean_branches"
lbr = for-each-ref --sort='-committerdate:iso8601' --format=' %(committerdate:iso8601)%09%(refname)' refs/heads
snc = "!source ~/.githelpers && create_snap"
sna = "!source ~/.githelpers && apply_snap"
snl = "!source ~/.githelpers && list_snaps"
snS = "!source ~/.githelpers && show_snap"
snr = "!source ~/.githelpers && revert_snap"
snx = "!source ~/.githelpers && remove_snap"
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true # use n and N to move between diff sections
#dark = true # or light = true, or omit for auto-detection
detect-dark-light = true
relative-paths = true
side-by-side = true
line-numbers = true
hunk-header-style = file line-number syntax
hunk-header-file-style = cyan
hunk-header-line-number-style = yellow
hunk-header-decoration-style = box
diff-so-fancy = false