Azure: quickly change branch used on continuous deployment (github)

1.8k views Asked by At

I have a webapp on Azure that is connected to github to do continuous deployment. Is there any quick way to change the branch it is connected to or I have to disconnect and then connect again to select the new branch?

The problem is that Azure has a bug somewhere that when I disconnect I can only connect again without an error, after 15 or 30 minutes of disconnecting...

2

There are 2 answers

2
Xiaomin Wu On

Try go to your scm site "https://{site name}.scm.azurewebsites.net"

Debug Console -> Navigate to D:\home\site\deployments

Edit settings.xml and change to your desire branch.

<?xml version="1.0" encoding="utf-8"?>
<settings>
    <deployment>
        <add key="branch" value="master" />
    </deployment>
</settings>
2
jakobandersen On

Using the xplat-cli you can do:

azure site repository <yourbranch>
azure site repository sync