15

I have two Firebase projects one for the development of another for production. How do I switch between them in the root branch with cloud functions? Since for example I'm developing a new function and I want to do deploy only on the firebase development project and check how it works before doing deploy in the firebase production project.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Alexander Khitev
  • 6,417
  • 13
  • 59
  • 115
  • Can you copy and paste your `index.js` file from the `functions` directory of your existing project to your new project and then deploy it to Firebase? – Rohan Stark Jul 13 '17 at 11:15

1 Answers1

30

Please read the documentation for the Firebase CLI. In particular, you'll want to learn about the firebase use command to create aliases for your projects and switch between them for deployment.

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
  • 2
    Yes, sorry, did not write an answer to this, yes I already read it there, also found the information here https://stackoverflow.com/questions/36432458/how-do-i-switch-apps-from-the-firebase-cli/36432783#36432783 – Alexander Khitev Jul 13 '17 at 13:16
  • 1
    firebase use --add – Alam Jul 07 '22 at 07:35