dotfiles/gitconfig

128 lines
3.3 KiB
Plaintext

[include]
# local and/or misc changes not committed to Git:
path = .gitconfig.local
[alias]
aa = add .
acf = !git add . && git cf
acfp = !git add . && git cf && git push
adp = add -p
an = add -N .
adn = an
b = branch
bn = rev-parse --abbrev-ref HEAD
br = branch
ca = commit --amend --no-edit
cad = !git commit --amend --no-edit --date \"$(date)\"
cae = commit --amend
cdf = clean -df
cdfn = clean -dfn
cf = !git commit --fixup $(git log --invert-grep --grep fixup -n1 --oneline --format=format:%h)
chp = checkout -p
ci = commit
cl = clone
cltms = !sh -c 'cd $HOME/dev && git clone $1 && cd $(basename $1 .git) && tmuxsess' --
co = checkout
cols = !git checkout $(git branch | fzf)
comb = !git checkout $(git mainbranch)
cost = checkout staging
cp = cherry-pick
cp2 = "!fn() { git cherry-pick $1~2..$1; }; fn"
cp3 = "!fn() { git cherry-pick $1~3..$1; }; fn"
cp4 = "!fn() { git cherry-pick $1~4..$1; }; fn"
cpls = !git cp $(git ls)
d = diff
dls = !git diff $(git branch | fzf)
dom = !git diff origin/$(git mainbranch)...
drb = !git diff $(git rb)
ds = diff --staged
f = fetch
fc = commit --allow-empty -m 'feat: first commit'
fixom = !sh -c 'git fetch && git rebase -i --autosquash origin/$(git mainbranch)'
fixup = rebase -i --autosquash
l = log
l1 = log --oneline
ll = log --oneline -n 5
lp = log -p
lpme = logpme
lm = logme
logme = !sh -c 'git log --author=\"$(git config --get user.name)\"'
logpme = !sh -c 'git log -p --author=\"$(git config --get user.name)\"'
lrb = !git log $(git drb)
ls = !git branch --format '%(refname:short)' | fzf
ma = merge --abort
mainbranch = !gitmainbranch
mls = !git merge $(git ls)
mr = !git merge $(git rb)
mrb = mr
mt = merge -s recursive -X theirs
nb = checkout -b
nuke1 = reset --hard HEAD^
nuke = reset --hard
p = push
pf = push --force-with-lease
pff = push --force
pl = pull
plr = pull --rebase
ph = push -u origin HEAD
pr = dom
prs = !git diff --stat origin/$(git mainbranch)
ra = rebase --abort
rb = !git rev-parse --abbrev-ref --symbolic-full-name @{u}
rc = rebase --continue
re = rebase
rels = !git rebase $(git branch | fzf)
ri = rebase -i --autosquash
rom = !sh -c 'git fetch && git rebase origin/$(git mainbranch)'
rr = !sh -c 'git fetch && git reset --hard $(git rb)'
rv = revert
rvh = revert HEAD
rvnh = revert -n HEAD
s = status
sh = show -p
sha = sy
shp = sh
sl = stash list
sq = merge --squash
sqls = !git sq $(git ls)
sqt = merge --squash -s recursive -X theirs
ss = stash save
st = stash
stus = stash --keep-index -u
sy = !gitsha1yank -s
sum = show --stat
sshp = stash show -p
undo = reset --soft HEAD^
wip = !git add . && git commit -m 'WIP'
wt = worktree
[user]
email = rob@netflux.io
name = Rob Watson
[core]
editor = nvim
quotePath = false
commitGraph = true
pager = delta
excludesFile = ~/.gitignore-global
[color]
ui = auto
[pull]
ff = only
[init]
defaultBranch = main
[credential "https://github.com"]
helper = !gh auth git-credential
[diff]
tool = vimdiff
[merge]
tool = vimdiff
[interactive]
diffFilter = delta --color-only
[delta]
side-by-side = true
plus-style = 'syntax "#142e20"'
zero-style = 'syntax "#1d1f21" dim'
minus-style = 'syntax "#36181d"'
commit-decoration-style = bold yellow box ul
file-style = bold yellow ul
file-decoration-style = none