dotfiles/gitconfig
Jonny Barnes 873be7be01 Improve diffs by using the git-delta package
Also, switch the diffing to using `zdiff3` and the `histogram` algorithm
2022-02-27 09:08:17 +00:00

64 lines
1.7 KiB
Text

[alias]
# list aliases
aliases = !git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /' | sort
bdm = "!git branch --merged | grep -v '*' | xargs -n 1 git branch -d"
lg = log --graph --pretty=tformat:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%an %ar)%Creset'
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
lastchange = log -p --follow -n 1
plog = log --graph --pretty='format:%C(red)%d%C(reset) %C(yellow)%h%C(reset) %ar %C(green)%aN%C(reset) %s'
rank = shortlog -sn --no-merges
st = status -sb
tlog = log --stat --since='1 Day Ago' --graph --pretty=oneline --abbrev-commit --date=relative
[apply]
# Detect whitespace errors when applying a patch
whitespace = fix
#[color "diff-highlight"]
# Colours for `diff-so-fancy`
#oldNormal = "red bold"
#oldHighlight = "red bold 52"
#newNormal = "green bold"
#newHighlight = "green bold 22"
[filter "lfs"]
# git-lfs stuff
clean = git-lfs clean %f
smudge = git-lfs smudge %f
required = true
[gpg]
# Use OpenSSH to sign commits/tags/etc
format = ssh
[help]
# Automatically correct typos in commands
autoCorrect = prompt
#[pager]
# Make diff-so-fancy apply all the time
#diff = "diff-so-fancy | less --tabs=4 -RFX"
#show = "diff-so-fancy | less --tabs=4 -RFX"
[core]
pager = delta
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true # use n and N to move between diff sections
[merge]
conflictstyle = zdiff3
[diff]
algorithm = histogram
colorMoved = default