You would have to shut from stable to master. Master isn't advised to be used in production, but for testing is fine.
To change branches you would type
git checkout master
git pull
./NodeBB upgrade
npm up
You may need to disable incompatible plugins if their are any.