create .gitconfig only if not exist

This commit is contained in:
斟酌 鵬兄 2022-08-12 01:19:32 +09:00
parent d0b06f42b9
commit 5fe9b2ef34

View File

@ -15,7 +15,7 @@ function git-config-as {
} }
if [ -f "$HOME/.gitconfig" ]; then if [ ! -f "$HOME/.gitconfig" ]; then
cat << ___CONF___ > "$HOME/.gitconfig" cat << ___CONF___ > "$HOME/.gitconfig"
[alias] [alias]
la = log --graph --full-history --date-order --all --pretty=format:'%Cred%h%Creset %ad %C(bold blue)[%an]%Creset | %C(white)%s%Creset %C(yellow)%d%Creset' --date=relative la = log --graph --full-history --date-order --all --pretty=format:'%Cred%h%Creset %ad %C(bold blue)[%an]%Creset | %C(white)%s%Creset %C(yellow)%d%Creset' --date=relative