From 4056e5eefabac8694f57ffdebf1622ff85c5cda7 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Tue, 23 Dec 2025 15:48:32 +0000 Subject: [PATCH] Committed --- git_automation.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/git_automation.sh b/git_automation.sh index 09ed251..c2f3107 100755 --- a/git_automation.sh +++ b/git_automation.sh @@ -16,11 +16,23 @@ echo "PLEASE make sure that you have a good .gitignore file set up to avoid comm while true; do if [[ -f "$TRIGGER_FILE" ]]; then rm -f "$TRIGGER_FILE" + echo "[INFO] Triggered at $(date)" + + # Prompt the user for a commit message + read -rp "Enter commit message: " COMMIT_MSG + # Fallback if the user presses enter without typing a message + if [[ -z "$COMMIT_MSG" ]]; then + COMMIT_MSG="Committed" + fi + + # Run Git commands git status git add . - git commit -m "Committed" + git commit -m "$COMMIT_MSG" git push + + echo "[INFO] Git commands completed at $(date)" fi sleep 0.5 done