first commit
This commit is contained in:
25
Linux/Development/MERGE-TO-PRODUCTION.sh
Normal file
25
Linux/Development/MERGE-TO-PRODUCTION.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Prompt for confirmation
|
||||
echo "Are you sure you want to merge 'development' into 'production'? (y/n)"
|
||||
read -r confirmation
|
||||
|
||||
if [[ "$confirmation" == "y" || "$confirmation" == "Y" ]]; then
|
||||
# Switch to the production branch
|
||||
git checkout production
|
||||
|
||||
# Pull the latest changes for production
|
||||
git pull origin production
|
||||
|
||||
# Merge the development branch into production
|
||||
git merge development
|
||||
|
||||
# Check if the merge was successful
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Merge successful. Please resolve any conflicts and commit."
|
||||
else
|
||||
echo "Merge failed. Please resolve conflicts manually."
|
||||
fi
|
||||
else
|
||||
echo "Merge aborted."
|
||||
fi
|
||||
Reference in New Issue
Block a user