This seems like something which should be pretty easy to do, but for whatever reason, I\'m being defeated.
I\'m trying to use the firebase-tools CLI to interact with
Found some useful information here Firebase CLI Reference.
The following code works for me.
firebase use <project_id>
Answer in 2020:
The officially recommended way is to use "alias":
In your .firebaserc
, set the different project IDs:
{
"projects": {
"production": "my-project-id",
"testing": "my-project-id--testing"
}
}
// you can also add these interactively with `firebase use --add`
Then you can do firebase use testing
or firebase use production
to switch between projects.
Note that switching projects won't create any git diff, it's simply remembered in your local machine. To see which project is currently being used, do firebase use
.
If you want to change the project ID without committing changes to the project owner's .firebaserc
, do firebase use my-project-id
locally as mentioned in the accepted answer. On the other hand, if you're the project owner and want others to use their own project IDs, you should add .firebaserc
into .gitignore
.