From 6ae344c17f45c5bc04416fa221668d5e0c053f3d Mon Sep 17 00:00:00 2001 From: DocTator Date: Mon, 28 Apr 2025 19:58:29 -0400 Subject: [PATCH] Auto-commit from giteapush.sh at 2025-04-28 19:58:29 --- miscellaneous/giteapushv2.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 miscellaneous/giteapushv2.sh diff --git a/miscellaneous/giteapushv2.sh b/miscellaneous/giteapushv2.sh new file mode 100755 index 0000000..efecf50 --- /dev/null +++ b/miscellaneous/giteapushv2.sh @@ -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