The Firebase CLI doesn’t know anything about your git branches. It just knows about the files it sees in the directory where it runs. If you want to deploy from another branch, you will have to check out that branch, then run the CLI. I think you might find it helpful to write your own script that runs these commands automatically.
CLICK HERE to find out more related problems solutions.