Create git config file under ~/.config

This will help to keep our git config alongside our other configuration
files instead of in the home directory under `~/.gitconfig`
This commit is contained in:
esteban_ba
2025-09-04 16:10:51 -07:00
parent 8fd668fbb3
commit ec428bc05f

View File

@@ -1,5 +1,12 @@
#!/bin/bash #!/bin/bash
# Create git config file under .config if it doesn't exist
# This helps to keep all our configs in one place
if [[ ! -f "~/.config/git/config" ]]; then
mkdir -p "~/.config/git"
touch "~/.config/git/config"
fi
# Set common git aliases # Set common git aliases
git config --global alias.co checkout git config --global alias.co checkout
git config --global alias.br branch git config --global alias.br branch