dotfiles/config/git/config

124 lines
3.3 KiB
Text

[alias]
alias = config --get-regexp ^alias
b = branch
bv = b -vv
ba = bv --all
cm = commit --verbose
co = checkout
d = diff
dc = d --cached
ds = !GIT_PAGER=\"delta-wrapper --side-by-side\" git diff
dcs = ds --cached
l = log --graph --pretty=basic
ln = log --graph --pretty=name
ll = log --graph --decorate --stat
lp = log -p
la = l --all
lna = ln --all
lla = ll --all
s = status --short
ss = status
start = !git init && git commit --allow-empty -m \"Initial commit\" && git l
[pretty]
basic = %C(auto)%h%d %s %C(8) %ad
name = %C(auto)%h%d %s %n%C(2)%aN <%C(10)%aE%C(2)> %C(8) %ad %n
[core]
excludesfile = ~/.config/git/ignore
trustctime = false # http://www.git-tower.com/blog/make-git-rebase-safe-on-osx/
pager = delta-wrapper
[init]
defaultBranch = main
[log]
date = human
[delta]
commit-decoration-style = "#d79921" bold box ul
commit-style = raw
dark = true
file-decoration-style = "#458588" bold box
file-modified-label = "modified:"
file-style = "#458588" # blue
hunk-header-style = omit
line-numbers = true
line-numbers-minus-style = "#cc241d" italic # red
line-numbers-plus-style = "#98971a" italic # green
line-numbers-zero-style = "#504945" # dark2
line-numbers-left-style = "#665c54" # dark3
line-numbers-right-style = "#ebdbb2" # light1
minus-emph-style = normal "#651e1b" # red almost darkest
minus-style = normal "#2e100f" # red darkest
plus-emph-style = syntax "#585818" # green almost darkest
plus-style = syntax "#2e2e0f" # green darkest
syntax-theme = Nord
[push]
default = upstream
[pull]
ff = only
[diff]
colorMoved = default
[merge]
tool = vimdiff
conflictstyle = diff3
[mergetool]
prompt = false
[mergetool "vimdiff"]
path = nvim
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
required = true
# Color palette translation:
#
# Solarized Git/ANSI Solarized Git/ANSI
# --------- -------- --------- --------
# base03 8 red 1
# base02 0 green 2
# base01 10 blue 4
# base00 11 magenta 5
# base0 12 yellow 3
# base1 14 cyan 6
# base2 7 orange 9
# base3 15 violet 13
[color]
ui = auto
[color "decorate"]
branch = blue
remoteBranch = bold red # orange
tag = green
stash = bold magenta
HEAD = cyan
[color "diff"]
meta = blue
frag = bold magenta # violet in solarized
old = red
new = green
[color "status"]
added = green
changed = red
untracked = cyan
[include]
path = ~/.local/etc/git/config.user # user name & e-mail (from template)
path = ~/.local/etc/git/config # optional manual configurations
# Overrides for my dotfiles directory to make sure I never commit with the
# wrong e-mail address.
[includeIf "gitdir:~/.dotfiles/"]
path = ~/.config/git/dotfiles