My script looks like this:
branch_name=$1
declare -a instances=("w-instance.eu" "x-instance.eu" "y-instance.eu" "z-instance.org")
for instance in "${instances[@]}"
do
cd "/home/ubuntu/$instance/mbf"
git checkout "$branch_name"
git pull origin "$branch_name"
python manage.py collectstatic --noinput
python manage.py migrate
sudo apachectl restart
done
I run it like this:
bash pull_merge_restart.sh some_branch
When I set branch name in script explicitly git didn't prompted me about note for merge. Now it opens nano and displays:
Merge branch 'production' of github.com:andilabs/xyz into production
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
how to force git to use default message, so that script runs automatically without being interrupted for human interaction??