Next: (heks-linux gtk), Previous: (heks-linux gif), Up: API
Renders the Git configuration ecosystem in your home directory:
- ~/.gitconfig - shared settings plus the includeIf rules
that switch identity based on the directory a repository lives in. -
~/.gitconfig-personal.ini and ~/.gitconfig-work.ini - the
two identities (name, e-mail, signing key). -
~/.gitignore-global - editor and build artefacts ignored
everywhere.
The interesting part is the includeIf mechanism: rather than
guessing who you are, Git picks the identity from the path. Add a
clause here when you start keeping repositories somewhere new, e.g. a
~/Fork/ checkout.
Note that the generated .gitconfig uses ~a = ~a~ formatting so
the includeIf "gitdir:..." keys can carry their leading
whitespace, which is what Git expects.
Default value:
"/root"
Default value:
".gitconfig"
Default value:
".gitconfig-personal.ini"
Default value:
".gitconfig-work.ini"
Default value:
".gitignore-global"
Write the whole Git configuration ecosystem into git-config-dir.
Four files are written from one call. Local overrides are read from
$XDG_CONFIG_HOME/heks-linux/git-settings.scm first.
((core (editor . "emacsclient") (excludesfile . "~/.gitignore-global")) (commit (gpgsign . "true")) (format (thread . "shallow")) (sendemail (thread . "no")) (pull (rebase . "false")) ("includeIf \"gitdir:~/Work/\"" (" path" . "~/.gitconfig-work.ini")) ("includeIf \"gitdir:~/Hacking/\"" (" path" . "~/.gitconfig-personal.ini")) ("includeIf \"gitdir:~/Fork/\"" (" path" . "~/.gitconfig-personal.ini")) ("includeIf \"gitdir:~/Scratch/\"" (" path" . "~/.gitconfig-personal.ini")))
((user (name . "Josep Bigorra") (email . "jjbigorra@@gmail.com") (signingkey . "24F46738CE114AF6")))
((user (name . "Josep Bigorra") (email . "josepbigorraalgaba@@vandebron.nl") (signingkey . "3B6D20502E380697")))
("bloop" ".bloop" ".metals" ".stack-work" "target" "metals.sbt" ".direnv" "dist-newstyle")
Next: (heks-linux gtk), Previous: (heks-linux gif), Up: API