#!/bin/bash # Check if a commit message was provided as an argument if [ -n "$1" ]; then COMMIT_MSG="$1" else # Use current date and time if no message is provided COMMIT_MSG="Update: $(date +'%Y-%m-%d %H:%M:%S')" fi echo "Adding all files..." git add . echo "Committing with message: $COMMIT_MSG" git commit -m "$COMMIT_MSG" echo "Pushing to origin..." git push origin --all