Files
it_school/Bash_scripting/autogit.sh
Ionel Andrei Cataon c23a81d8e1 updated
2025-12-23 14:48:54 +02:00

18 lines
319 B
Bash
Executable File

#!/bin/bash
# Script to add all changes, commit with the message "updated", and push to repo.
git add .
# Check if there are changes to commit
if git diff-index --quiet HEAD --; then
echo "No changes to commit."
exit 0
fi
git commit -m "updated"
git push
echo "Changes committed and pushed successfully!"