Refacere repo
This commit is contained in:
17
Bash_scripting/autogit.sh
Executable file
17
Bash_scripting/autogit.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/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!"
|
||||
Reference in New Issue
Block a user