Files
EarlyBirds.me/push.sh
2026-04-01 16:40:46 +02:00

23 lines
343 B
Bash
Executable File

#!/usr/bin/env bash
set -e
BRANCH="main"
if [ -z "$(git status --porcelain)" ]; then
echo "No changes to commit."
exit 0
fi
MSG="update-$(date +%Y%m%d-%H%M%S)-$RANDOM"
echo "Using commit message: $MSG"
echo "==> git add"
git add .
echo "==> git commit"
git commit -m "$MSG"
echo "==> git push"
git push origin "$BRANCH"
echo "Done."