Add git config set - #41
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gitconfig set (config/sets/git/), universal likebasic(noosfile).st/co/br/ci/last/unstage/amend), sane defaults (autoprune on fetch,autoSetupRemoteon push, rerere,diff3conflict markers), a global gitignore, and a per-machine identity file (~/.config/git/identity, copied once so different machines can carry differentuser.name/user.email).A bug caught while testing
Writing Delta's config with
git config --globalis wrong here: with no~/.gitconfigon the machine yet,--globalresolves to~/.config/git/config— which is a symlink back into this repo. Running that against a real deploy overwrote the trackedgitconfigfile directly (confirmed by actually doing it once against this repo before catching it). Fixed by writing to a separate, untracked~/.config/git/localfile viagit config --file, included from the trackedgitconfig— a missing include target is a silent no-op, so this degrades cleanly when Delta isn't available.Test plan
shellcheckonconfig/sets/git/apply.shpasses cleaninstall-scripts/02-move-files.shend-to-end against an isolated$HOMEwith only thegitset enabled: confirmedgitconfig/gitignoreland as symlinks,identityis copied (and untouched by re-runs after hand-editing it), Delta installs and its config lands in the untrackedlocalfile, and the trackedgitconfigfile is byte-for-byte unchanged afterwardgit var GIT_AUTHOR_IDENT,git config --getinside an actual repo) correctly picks up identity, aliases, and the Delta pager through the[include]chain