Skip to content

Add git config set - #41

Merged
RWejlgaard merged 2 commits into
masterfrom
add-git-set
Aug 13, 2026
Merged

Add git config set#41
RWejlgaard merged 2 commits into
masterfrom
add-git-set

Conversation

@RWejlgaard

Copy link
Copy Markdown
Owner

Summary

  • Adds a new git config set (config/sets/git/), universal like basic (no os file).
  • Aliases (st/co/br/ci/last/unstage/amend), sane defaults (autoprune on fetch, autoSetupRemote on push, rerere, diff3 conflict markers), a global gitignore, and a per-machine identity file (~/.config/git/identity, copied once so different machines can carry different user.name/user.email).
  • Installs Delta and wires it in as the diff/log pager.
  • Documents the new set in the README.

A bug caught while testing

Writing Delta's config with git config --global is wrong here: with no ~/.gitconfig on the machine yet, --global resolves to ~/.config/git/config — which is a symlink back into this repo. Running that against a real deploy overwrote the tracked gitconfig file directly (confirmed by actually doing it once against this repo before catching it). Fixed by writing to a separate, untracked ~/.config/git/local file via git config --file, included from the tracked gitconfig — a missing include target is a silent no-op, so this degrades cleanly when Delta isn't available.

Test plan

  • shellcheck on config/sets/git/apply.sh passes clean
  • Ran the real install-scripts/02-move-files.sh end-to-end against an isolated $HOME with only the git set enabled: confirmed gitconfig/gitignore land as symlinks, identity is copied (and untouched by re-runs after hand-editing it), Delta installs and its config lands in the untracked local file, and the tracked gitconfig file is byte-for-byte unchanged afterward
  • Verified real git command resolution (git var GIT_AUTHOR_IDENT, git config --get inside an actual repo) correctly picks up identity, aliases, and the Delta pager through the [include] chain
  • Not tested on macOS/FreeBSD/Alpine/Gentoo (no such machine available in this environment) — the per-OS Delta package names there are taken from public package indices, not verified firsthand

Aliases, sane defaults (autoprune, autoSetupRemote, rerere, diff3
conflict markers), a global gitignore, and a per-machine identity
file. Also installs Delta and wires it in as the diff/log pager,
writing to a separate untracked file rather than `git config
--global` so it can never clobber the tracked gitconfig symlink.
file-style and line-numbers-{left,right}-style default to plain ANSI
"blue", which reads poorly on a dark background; every other default
style resolves to a specific RGB/256-color value. Line numbers are
off by default.
@RWejlgaard
RWejlgaard merged commit eb46566 into master Aug 13, 2026
6 checks passed
@RWejlgaard
RWejlgaard deleted the add-git-set branch August 13, 2026 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant