Files
dotfiles/home/.gitconfig
Andrejus 71748c2328 fix(git): graceful delta fallback when not installed
core.pager now checks for delta and falls back to less -R,
avoiding errors in environments where delta is not available.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-13 17:16:53 +00:00

101 lines
2.4 KiB
INI

[include]
path = ~/.gitconfig.local
[github]
user = andrejusk
[credential]
helper =
[credential "https://github.com"]
helper = !/usr/bin/env gh auth git-credential
[credential "https://gist.github.com"]
helper = !/usr/bin/env gh auth git-credential
[init]
defaultBranch = master
[core]
autocrlf = input
pager = "command -v delta >/dev/null 2>&1 && delta || less -R"
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true
side-by-side = false
line-numbers = true
paging = always
pager = less --mouse -R -+X -+F
syntax-theme = dots
file-decoration-style = none
file-style = "#2CB494" bold
hunk-header-decoration-style = none
line-numbers-left-style = "#808080"
line-numbers-right-style = "#808080"
line-numbers-minus-style = "#F88C14"
line-numbers-plus-style = "#2CB494"
plus-style = syntax "#0C2A24"
plus-emph-style = syntax "#164A3C"
minus-style = syntax "#2A1A0A"
minus-emph-style = syntax "#3A2A1A"
[merge]
conflictstyle = zdiff3
[color]
ui = auto
[color "status"]
added = "#2CB494"
changed = "#7290B8"
untracked = "#F88C14" italic
branch = "#2CB494"
header = "#CCE0D0"
[color "diff"]
meta = "#88409C"
frag = "#4068D4"
old = "#F88C14"
new = "#2CB494"
context = "#808080"
commit = "#F88C14"
[color "branch"]
current = "#2CB494" bold
local = "#CCE0D0"
remote = "#4068D4"
upstream = "#7290B8"
[color "decorate"]
branch = "#2CB494"
remoteBranch = "#4068D4"
tag = "#F88C14"
stash = "#88409C"
HEAD = "#F88C14" bold
[alias]
l = log --pretty=format:"%C(#F88C14)%h\\ %ad%C(#2CB494)%d\\ %Creset%s%C(#808080)\\ [%cn]" --decorate --date=short
ls = log --pretty=format:"%C(#F88C14)%h%C(#2CB494)%d\\ %Creset%s%C(#808080)\\ [%cn]" --decorate
ll = log --pretty=format:"%C(#F88C14)%h%C(#2CB494)%d\\ %Creset%s%C(#808080)\\ [%cn]" --decorate --numstat
ld = log --pretty=format:"%C(#F88C14)%h\\ %ad%C(#2CB494)%d\\ %Creset%s%C(#808080)\\ [%cn]" --decorate --date=relative
le = log --oneline --decorate
lg = log --graph --decorate --oneline
d = diff
ds = diff --stat
dc = diff --cached
s = status -s
b = "!git for-each-ref --sort='-authordate' --format='%(authordate)%09%(objectname:short)%09%(refname)' refs/heads | sed -e 's-refs/heads/--'"
a = add
r = restore --staged
ap = add -p
c = commit --verbose
ca = commit -a --verbose
cm = commit -m
cam = commit -a -m
m = commit --amend --verbose
f = fetch
p = pull
st = stash
sa = stash apply