Next: , Previous: , Up: API  


1.8 (heks-linux git)

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.

1.8.1 Parameters

Parameter: git-config-dir

Default value:

"/root"
Parameter: gitconfig-filename

Default value:

".gitconfig"
Parameter: gitconfig-personal-filename

Default value:

".gitconfig-personal.ini"
Parameter: gitconfig-work-filename

Default value:

".gitconfig-work.ini"
Parameter: gitignore-global-filename

Default value:

".gitignore-global"

1.8.2 Procedures

Procedure: install-git-config

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.

1.8.3 Variables

Variable: gitconfig
((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")))
Variable: gitconfig-personal
((user (name . "Josep Bigorra") (email . "jjbigorra@@gmail.com") (signingkey . "24F46738CE114AF6")))
Variable: gitconfig-work
((user (name . "Josep Bigorra") (email . "josepbigorraalgaba@@vandebron.nl") (signingkey . "3B6D20502E380697")))
Variable: gitignore-global
("bloop" ".bloop" ".metals" ".stack-work" "target" "metals.sbt" ".direnv" "dist-newstyle")

Next: (heks-linux gtk), Previous: (heks-linux gif), Up: API