How do I switch branch after deploying app via Streamlit Cloud?

Hi, I have a private streamlit app deployed on the Streamlit Cloud. I’d like to switch the branch this app is reading from – right now it’s reading from main and i’d like the app to start reading from another branch.

I don’t see an option to do this on the streamlit settings. Anyone know how I can do this? I’d prefer not to delete the app and start over because I have users and it would be a bit disruptive.

I think there is no other way. It should not be that disruptive, every web app or service out there shuts down every now and then for updates, maintenance… If you give notice in advance and the shutdown is short, you should be fine.

1 Like

@Goyo is correct. I’ve recently added added a page to the docs to call this out explicitly: Rename or change your app's GitHub coordinates - Streamlit Docs

Fortunately, your app should be back up in minutes.

Got it, thanks! And just to confirm, I’d have to re-add every user back to the app. That is, even though it’s the same repo/different branch, the users won’t persist from the old deployment ?

Yes. You’ll lose your analytics and need to re-add invited viewers. (You can copy and save the list from your app before you delete it to make that part easy.)

Oh! Yeah, that is disruptive.