dotfiles/scripts/git_commit
Michael Grote fb1e4f6ccd bash: move gcm to scripts
Signed-off-by: Michael Grote <michael.grote@posteo.de>
2024-06-05 20:21:04 +02:00

8 lines
257 B
Bash
Executable file

#!/bin/bash
if [ -z "$1" ]; then
echo "Commit-Message fehlt, setze Default-Message..."
git commit -s -m "changed Files: $(git diff --name-only --staged)"
else
# übergibt alle argumente an git commit -m als commit nachricht
git commit -s -m "$*"
fi