From e88c49c72d71fde3c60dbfb7a591941d49628681 Mon Sep 17 00:00:00 2001 From: Jack Platten Date: Wed, 20 May 2026 14:33:17 -0700 Subject: [PATCH] Update .config/git/config --- private_dot_config/git/config.tmpl | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/private_dot_config/git/config.tmpl b/private_dot_config/git/config.tmpl index 0f58ee3..3d9dd39 100644 --- a/private_dot_config/git/config.tmpl +++ b/private_dot_config/git/config.tmpl @@ -1,9 +1,13 @@ +{{ $dir := dir .chezmoi.targetFile -}} +{{ $github := joinPath $dir "github.conf" -}} +{{ $gitlab := joinPath $dir "gitlab.conf" -}} + [init] defaultBranch = main [include] path = "{{ .chezmoi.homeDir }}{{ .chezmoi.pathSeparator }}.gitconfig.d{{ .chezmoi.pathSeparator }}themes.gitconfig" - + [user] email = "{{ .email }}" name = "{{ .name }}" @@ -82,19 +86,19 @@ [push] autoSetupRemote = true followTags = true - + [includeIf "hasconfig:remote.*.url:https://github.com/**"] - path = "{{ joinPath .chezmoi.homeDir ".gitconfig.d" "github.conf"}}" + path = "{{ $github }}" [includeIf "hasconfig:remote.*.url:git@github.com:*/**"] - path = "{{ joinPath .chezmoi.homeDir ".gitconfig.d" "github.conf"}}" + path = "{{ $github }}" [includeIf "hasconfig:remote.*.url:ssh://git@github.com:*/**"] - path = "{{ joinPath .chezmoi.homeDir ".gitconfig.d" "github.conf"}}" + path = "{{ $github }}" [includeIf "hasconfig:remote.*.url:ssh://git@gitlab.com:*/**"] - path = "{{ joinPath .chezmoi.homeDir ".gitconfig.d" "gitlab.conf"}}" + path = "{{ $gitlab }}" [includeIf "hasconfig:remote.*.url:https://gitlab.com/**"] - path = "{{ joinPath .chezmoi.homeDir ".gitconfig.d" "gitlab.conf"}}" + path = "{{ $gitlab }}" [includeIf "hasconfig:remote.*.url:git@gitlab.com:*/**"] - path = "{{ joinPath .chezmoi.homeDir ".gitconfig.d" "gitlab.conf"}}" + path = "{{ $gitlab }}" [pager] difftool = true @@ -141,4 +145,4 @@ helper = !/opt/homebrew/bin/gh auth git-credential [credential "https://gist.github.com"] helper = - helper = !/opt/homebrew/bin/gh auth git-credential \ No newline at end of file + helper = !/opt/homebrew/bin/gh auth git-credential -- 2.51.2