Switching from Git master back to stable

Hi

I have all the components of Emoncms currently running Master to enable my system to function correctly. I see stable now has all the master updates I need.

What is the simplest way to switch back to stable. Do I have to go through all the components individually?

Ian

I use this script. It can be used to switch between master/stable. If there is not a stable branch it just fails that command with an error.and continues. Does the main emoncms repo and then loops through the Modules.

Run a full update after.

#!/bin/sh
# emoncms switch branch script

EMONCMS_DIR=/var/www/emoncms
BRANCH=stable

printf "***** git -C $EMONCMS_DIR checkout $BRANCH *****\n"
sudo git -C $EMONCMS_DIR checkout $BRANCH
sudo git -C $EMONCMS_DIR status

for M in $EMONCMS_DIR/Modules/*
  do
    if [ -d "$M/.git" ]; then
      printf "\nUpdate emoncms/$(basename $M)....\n"
      printf "***** git -C $M checkout $BRANCH *****\n"
      sudo git -C $M checkout $BRANCH
      sudo git -C $M status
    fi
  done

In the home directory

nano update.sh

paste the code above (uaually a right click) and then CTL+x and ‘y’ to save

Then… (make the script executable & run it)

chmod +x update.sh
./update.sh

A post was split to a new topic: Error in log on update to 10.1.0