chore: update gitconfig structure and add base config

This commit is contained in:
2025-06-23 09:29:06 +02:00
parent 0ef0739ad3
commit 82ee9bda0a
4 changed files with 14 additions and 3 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
CONFIG_DIR="$DOTFILES_INSTALL_DIR/.gitconfig.d"
CONFIG_DIR="$DOTFILES_INSTALL_DIR/.gitconfig.d/var"
echo
echo "[+] Generating Gitconfig"
@ -8,6 +8,8 @@ echo
rm -f "$HOME/.gitconfig"
cp "$DOTFILES_INSTALL_DIR/.gitconfig.d/base.gitconfig" "$HOME/.gitconfig"
for config in "$CONFIG_DIR"/*.gitconfig; do
[ -e "$config" ] || continue
@ -23,7 +25,6 @@ for config in "$CONFIG_DIR"/*.gitconfig; do
echo "Create config for $domain"
cat <<EOF >> "$HOME/.gitconfig"
[includeIf "hasconfig:remote.*.url:https://**$domain/**"]
path = $config
EOF