[alias] a = add --all ci = commit --all co = checkout bare = clone --bare l = log --all --graph --pretty=format:'%C(magenta)%h %C(white) %an %ar%C(auto) %D%n%s%n' m = mergetool ra = rebase --abort rc = rebase --continue st = status --short unstage = reset HEAD -- up = push tracked = rev-parse --abbrev-ref --symbolic-full-name @{upstream} last = log -1 HEAD ui = !gitu down = "!sh -c 'git pull --recurse-submodules \"$@\" && git submodule sync --recursive && git submodule update --init --recursive' -" diffz = difftool --tool zed rv = "!f() { base=origin/trunk; if [ \"$1\" != \"\" ] && [ \"$1\" != \"--\" ]; then base=$1; shift; fi; if [ \"$1\" = \"--\" ]; then shift; fi; next() { printf '\\n[Enter] %s / [Ctrl-C] stop ' \"$1\"; read -r _; }; git fetch --all --prune || return; echo \"STEP 1/4 COMMITS $base..HEAD\"; git log --oneline --decorate --graph \"$base..HEAD\"; next \"STEP 2/4 FILES\"; echo \"STEP 2/4 FILES $base...HEAD\"; git diff --name-status \"$base...HEAD\" -- \"$@\"; git diff --stat \"$base...HEAD\" -- \"$@\"; next \"STEP 3/4 DELTA DIFF\"; echo \"STEP 3/4 DELTA DIFF $base...HEAD\"; git diff \"$base...HEAD\" -- \"$@\"; next \"STEP 4/4 DIFFTASTIC\"; echo \"STEP 4/4 DIFFTASTIC $base...HEAD\"; git difftool --no-symlinks -d \"$base...HEAD\" -- \"$@\"; }; f" pf = push --force-with-lease [core] attributesfile = ~/.config/git/gitattributes autocrlf = false safecrlf = false compression = 9 editor = nvim fscache = true fsmonitor = true preloadindex = true quotepath = false symlinks = true untrackedcache = true pager = delta compression = 9 [log] abbrevCommit = true graphColors = blue,yellow,cyan,magenta,green,red [color "decorate"] HEAD = red branch = blue tag = yellow remoteBranch = magenta [color "branch"] current = magenta local = default remote = yellow upstream = green plain = blue [apply] # `error` is an action, not a core.whitespace token: refuse to apply patches # that introduce whitespace damage instead of merely warning. whitespace = error [advice] addEmptyPathSpec = false pushNonFastForward = false statusHints = false [url "git@github.com:bugabinga/"] insteadOf = "bugabinga:" [url "git@github.com:isp-insoft/"] insteadOf = "isp:" [url "git@github.com:"] insteadOf = "github:" [status] branch = true showStash = true showUntrackedFiles = all submoduleSummary = true [filter "lfs"] clean = git-lfs clean -- %f smudge = git-lfs smudge -- %f process = git-lfs filter-process required = true [help] # try to automatically correct misspelled git commands autocorrect = 1 [color] interactive = true ui = auto [rebase] autoStash = true updateRefs = true missingCommitsCheck = warn [rerere] enabled = true autoupdate = true [difftool] prompt = false [difftool "zed"] # Binary is named 'zeditor' on some distros, 'zed' elsewhere. cmd = "\"$(command -v zeditor || command -v zed)\" --wait --diff \"$LOCAL\" \"$REMOTE\"" [diff "javap"] textconv = javap -p -c cachetextconv = true [diff "zip"] textconv = unzip -l cachetextconv = true [diff "pandoc"] textconv = pandoc --to=markdown --wrap=none cachetextconv = true [diff "toml"] xfuncname = "^\\[.*\\]$" [diff "yaml"] xfuncname = "^[^ \t#-].*:.*$" [diff "zig"] # Hunk headers name the enclosing declaration in Zig and ZON sources. # Capture groups would truncate the header, so the alternation is group-free. xfuncname = "^pub .*$|^fn .*$|^const .*$|^var .*$|^test .*$|^export .*$|^inline .*$|^comptime .*$" [difftool "difftastic"] cmd = "difft \"$LOCAL\" \"$REMOTE\"" [diff] # Difftastic as default `git difftool` target. tool = difftastic algorithm = histogram colorMoved = zebra colorMovedWS = allow-indentation-change context = 3 interHunkContext = 10 mnemonicPrefix = true renames = true submodule = log [merge] tool = nvimdiff2 renormalize = true autostash = true conflictstyle = zdiff3 [mergetool] keepBackup = false prompt = false [merge "mergiraf"] name = mergiraf # A driver that exits non-zero means "conflict", so a missing mergiraf would # leave the file untouched with no markers. Fall back to git's own merge. driver = "sh -c 'if command -v mergiraf >/dev/null 2>&1; then exec mergiraf merge --git \"$1\" \"$2\" \"$3\" -s \"$4\" -x \"$5\" -y \"$6\" -p \"$7\" -l \"$8\"; else exec git merge-file --marker-size=\"$8\" -L \"$5\" -L \"$4\" -L \"$6\" \"$2\" \"$1\" \"$3\"; fi' -- %O %A %B %S %X %Y %P %L" [branch] sort = committerdate autoSetupMerge = inherit [gpg] format = ssh [gpg "ssh"] allowedSignersFile = ~/.config/git/allowed_signers [tag] sort = version:refname gpgSign = true [transfer] fsckObjects = true [receive] fsckObjects = true [fetch] fsckObjects = true parallel = 0 prune = true pruneTags = true all = true recurseSubmodules = false [push] autoSetupRemote = true default = current followTags = true recurseSubmodules = check [pull] default = current rebase = true recurseSubmodules = false [interactive] diffFilter = delta --color-only singlekey = true [delta] side-by-side = true line-numbers = true decorations = true navigate = true [init] defaultBranch = trunk [commit] verbose = true gpgSign = true [submodule] recurse = false fetchJobs = 0 [pager] # Use a pager if the difftool output is larger than one screenful, # consistent with the behaviour of `git diff`. difftool = true [checkout] workers = 0 [column] ui = auto [safe] bareRepository = explicit [worktree] guessRemote = true # In order to have host-specific configuration, I include additional settings here. # On each host a different file might be symlinked into '.gitconfig.include'. [include] path = .gitconfig.include