diff --git a/Bash_scripting/autogit.sh b/Bash_scripting/autogit.sh new file mode 100755 index 0000000..74e33ca --- /dev/null +++ b/Bash_scripting/autogit.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# Simple script to add all changes, commit with message "updated", and push + +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!"