18 lines
410 B
Bash
18 lines
410 B
Bash
#!/bin/bash
|
|
# Add all files to Git
|
|
git add .
|
|
|
|
# Prompt for commit message
|
|
read -p "Enter the commit message: " commitMessage
|
|
|
|
# Commit the changes
|
|
git commit -m "$commitMessage"
|
|
|
|
# Confirm if the user wants to push the changes
|
|
read -p "Do you want to push the changes to the main branch? (yes/no): " confirmPush
|
|
if [[ "$confirmPush" == "yes" ]]; then
|
|
git push origin
|
|
else
|
|
echo "Changes not pushed."
|
|
fi
|