Files
Scripts/Linux/Development/push-scripts-to-repo.sh
2026-01-12 23:52:33 +01:00

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