Files
TVGuide/gitpush.sh
T
2026-07-07 08:16:24 +02:00

38 lines
492 B
Bash
Executable File

#!/bin/bash
set -e
if [ $# -eq 0 ]; then
echo "Verwendung: $0 \"Commit-Kommentar\""
exit 1
fi
COMMENT="$*"
cd "$(dirname "$0")"
echo ">>> Git Status"
git status --short
echo
echo ">>> git add ."
git add .
echo
echo ">>> git commit -m \"$COMMENT\""
# Nur committen, wenn es Änderungen gibt
if git diff --cached --quiet; then
echo "Keine Änderungen zum Commit vorhanden."
exit 0
fi
git commit -m "$COMMENT"
echo
echo ">>> git push"
git push
echo
echo "✅ Fertig."