Skip to content

Commit 8c408b0

Browse files
authored
Merge pull request #93382 from pamelafox/patch-4
Add instructions for pushing to the remote
2 parents e8bba59 + 4bcd4c3 commit 8c408b0

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

articles/app-service/includes/quickstart-python/deploy-local-git.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
author: DavidCBerry13
3-
ms.author: daberry
2+
author: cephalin
3+
ms.author: cephalin
44
ms.topic: include
55
ms.date: 01/29/2022
66
---
@@ -15,6 +15,20 @@ You can deploy your application code from a local Git repository to Azure by con
1515
| [!INCLUDE [Deploy local Git Azure portal 3](<./deploy-local-git-azure-portal-3.md>)] | :::image type="content" source="../../media/quickstart-python/deploy-local-git-azure-portal-3-240px.png" alt-text="A screenshot showing the deployment center after saving and the remote Git URL to use for deployments." lightbox="../../media/quickstart-python/deploy-local-git-azure-portal-3.png"::: |
1616
| [!INCLUDE [Deploy local Git Azure portal 4](<./deploy-local-git-azure-portal-4.md>)] | :::image type="content" source="../../media/quickstart-python/deploy-local-git-azure-portal-4-240px.png" alt-text="A screenshot showing the location of the deployment credentials in the deployment center in App Service." lightbox="../../media/quickstart-python/deploy-local-git-azure-portal-4.png"::: |
1717

18+
Next, in the root directory of your application, configure a [Git remote](https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes) that points to Azure using the Git URL of the Azure remote obtained in a previous step.
19+
20+
```bash
21+
git remote add azure <git-deployment-url>
22+
```
23+
24+
You can now push code from your local Git repository to Azure using the Git remote you just configured. The default deployment branch for App Service is `master`, but many Git repositories are moving away from `master` to `main`. You can either specify the mapping from local branch name to remote branch name in the push (as shown below), or you can configure your [`DEPLOYMENT_BRANCH` app setting](/azure/app-service/deploy-local-git?tabs=cli#change-deployment-branch).
25+
26+
```bash
27+
git push azure main:master
28+
```
29+
30+
The first time you push code to Azure, Git will prompt you for the Azure deployment credentials you obtained in the previous step. Git will then cache these credentials so you will not have to reenter them on subsequent deployments.
31+
1832
### [Azure CLI](#tab/deploy-instructions-azcli)
1933

2034
First, configure the deployment source for your web app to be local Git using the `az webapp deployment source` command. This command will output the URL of the remote Git repository that you will be pushing code to. Make a copy of this value as you will need it in a later step.
@@ -31,7 +45,7 @@ Next, in the root directory of your application, configure a [Git remote](https:
3145
git remote add azure <git-deployment-url>
3246
```
3347

34-
You can now push code from your local Git repository to Azure using the Git remote you just configured. Master is the default deployment branch for App Service. You must specify the mapping from local branch name to remote branch name in the push.
48+
You can now push code from your local Git repository to Azure using the Git remote you just configured. The default deployment branch for App Service is `master`, but many Git repositories are moving away from `master` to `main`. You can either specify the mapping from local branch name to remote branch name in the push (as shown below), or you can configure your [`DEPLOYMENT_BRANCH` app setting](/azure/app-service/deploy-local-git?tabs=cli#change-deployment-branch).
3549

3650
```bash
3751
git push azure main:master

0 commit comments

Comments
 (0)