Auto-commit from giteapush.sh at 2025-04-28 19:58:29

This commit is contained in:
DocTator 2025-04-28 19:58:29 -04:00
parent 741b6e97e0
commit 6ae344c17f

22
miscellaneous/giteapushv2.sh Executable file
View File

@ -0,0 +1,22 @@
#!/bin/bash
# Genesis Radio Git Auto-Push
# Smarter, safer version
# Move to top-level of Git repo automatically
cd "$(git rev-parse --show-toplevel)" || { echo "Not inside a git repo. Exiting."; exit 1; }
# Log the current location
echo "Working in $(pwd)"
# Stage all changes (new, modified, deleted files)
git add -A
# Check if there's anything to commit
if ! git diff --cached --quiet; then
TIMESTAMP=$(date +"%Y-%m-%d %H:%M:%S")
git commit -m "Auto-commit from giteapush.sh at $TIMESTAMP"
git push origin main
echo "✅ Changes committed and pushed at $TIMESTAMP"
else
echo " No changes to commit."
fi