1
0
Fork 0
dotfiles/git/config
2025-05-14 15:54:42 -07:00

104 lines
2.1 KiB
Text

[advice]
skippedCherryPicks = false
[blame]
markIgnoredLines = true
markUnblameableLines = true
[color]
ui = true
[commit]
verbose = true
[core]
attributesfile = ~/.gitattributes
excludesfile = ~/.gitignore
pager = delta
[credential]
helper = cache
[delta]
navigate = true
[diff]
colorMoved = dimmed-zebra
wsErrorHighlight = all
# https://gist.github.com/tekin/12500956bd56784728e490d8cef9cb81#gistcomment-3500150
[diff "rspec"]
xfuncname = "^[ \t]*((RSpec|describe|context|it|before|after|around|feature|scenario|background)[ \t].*)$"
[difftool "difftastic"]
cmd = difft "$LOCAL" "$REMOTE"
[init]
defaultBranch = main
[interactive]
diffFilter = delta --color-only
[log]
date = iso
[merge]
conflictStyle = zdiff3
ff = only
tool = nvimdiff
[pager]
difftool = true
[pull]
ff = only
[push]
default = simple
[tag]
sort = version:refname
[alias]
ap = add -p
b = branch
bl = branch --list --format='%(refname:lstrip=2)'
bn = symbolic-ref --short HEAD
bp = branch-prune
bpf = branch-prune --force
bv = branch -vv
c = commit
chk = commit --all --no-verify --allow-empty-message --message ''
co = checkout
cp = cherry-pick
d = diff
db = diff-branch
dc = diff --cached
dft = difftool --tool=difftastic --no-prompt
diff-branch = "!diff_branch() { git diff \"$(git merge-base HEAD \"${1:-main}\")\"; }; diff_branch"
dn = diff --name-only --relative
dw = diff --word-diff
dww = diff --word-diff --word-diff-regex=.
f = fetch
fb = fetch-branch
fixup = commit --amend --no-edit
fp = fetch --prune
lag = log --graph --decorate --pretty='%C(auto)%h%d %s | %C(cyan)%an%C(reset) %C(green)<%ar>%C(reset)'
lcg = log --graph --decorate --pretty='%C(auto)%h%d %s | %C(cyan)%cn%C(reset) %C(green)<%cr>%C(reset)'
lg = lag --topo-order
mb = merge-base HEAD
pushf = push --force-with-lease
pushu = "!pushu() { git push --set-upstream \"${1:-origin}\" \"${2:-$(git bn)}\"; }; pushu"
rb = rebase
root = rev-parse --show-toplevel
s = status
sb = show-branch
sw = switch
swi = "!git switch \"$(git bl | fzf)\""
unchk = reset --mixed HEAD~
untracked = ls-files --others --exclude-standard
[include]
path = config-os
path = config-role
path = config-secrets