From d2701556e966781c62e952180e97c26373b5f69e Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Thu, 1 Sep 2022 12:59:39 +0200 Subject: [PATCH] bash: gcm --- .bash_extra | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.bash_extra b/.bash_extra index 732bc25..db4a369 100644 --- a/.bash_extra +++ b/.bash_extra @@ -156,8 +156,13 @@ function ssh { fi } function gcm { - # übergibt alle argumente an git commit -m als commit nachricht - git commit -m "$*" + if [ -z "$1" ]; then + echo "Commit-Message fehlt, setze Default-Message..." + git commit -m "changed Files: $(git diff --name-only --staged)" + else + # übergibt alle argumente an git commit -m als commit nachricht + git commit -m "$*" + fi } function gc { case "$1" in