[user] email = {{ .email }} name = {{ .git_name }} [init] defaultBranch = main [merge] ff = true {{- $credentialHelperPath := "" }} {{- if eq .chezmoi.osRelease.id "arch" }} {{- $credentialHelperPath = "/usr/lib/git-core/git-credential-libsecret" }} {{- end }} {{- if $credentialHelperPath }} [credential] helper = {{ $credentialHelperPath }} {{- end }} {{- $projectsDir := joinPath .chezmoi.homeDir "Projects" }} {{- if stat $projectsDir }} {{- $projects := output "find" $projectsDir "-type" "f" "-mindepth" "2" "-maxdepth" "2" "-name" ".gitconfig" | trim | splitList "\n" }} {{- range $projects }} {{- if . }} [includeIf "gitdir:{{ . | dir }}/**/"] path = {{ . }} {{- end }} {{- end }} {{- end }}