| title | include file |
|---|---|
| description | include file |
| services | app-service |
| author | cephalin |
| ms.service | azure-app-service |
| ms.topic | include |
| ms.date | 02/02/2018 |
| ms.author | cephalin |
| ms.custom | include file |
-
Because you're deploying the
mainbranch, you need to set the default deployment branch for your App Service app tomain. (See Change deployment branch.) In the Cloud Shell, set theDEPLOYMENT_BRANCHapp setting by using theaz webapp config appsettings setcommand.az webapp config appsettings set --name <app-name> --resource-group myResourceGroup --settings DEPLOYMENT_BRANCH='main' -
Back in the local terminal window, add an Azure remote to your local Git repository. Replace <deploymentLocalGitUrl-from-create-step> with the URL of the Git remote that you saved from Create a web app.
git remote add azure <deploymentLocalGitUrl-from-create-step>
-
Push to the Azure remote to deploy your app with the following command. When Git Credential Manager prompts you for credentials, make sure you enter the credentials you created in Configure local git deployment, not the credentials you use to sign in to the Azure portal.
git push azure main
This command might take a few minutes to run. While running, it displays information similar to the following example: