From 5fe9b2ef34b79baca969fbce821ef9cab9cdd4df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=9F=E9=85=8C=20=E9=B5=AC=E5=85=84?= Date: Fri, 12 Aug 2022 01:19:32 +0900 Subject: [PATCH] create .gitconfig only if not exist --- bash/bashrc/sources/31_git-utils | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bash/bashrc/sources/31_git-utils b/bash/bashrc/sources/31_git-utils index a8779ac..0a7719d 100644 --- a/bash/bashrc/sources/31_git-utils +++ b/bash/bashrc/sources/31_git-utils @@ -15,7 +15,7 @@ function git-config-as { } -if [ -f "$HOME/.gitconfig" ]; then +if [ ! -f "$HOME/.gitconfig" ]; then cat << ___CONF___ > "$HOME/.gitconfig" [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