You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/app-service/includes/quickstart-python/deploy-local-git.md
+17-3Lines changed: 17 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
-
author: DavidCBerry13
3
-
ms.author: daberry
2
+
author: cephalin
3
+
ms.author: cephalin
4
4
ms.topic: include
5
5
ms.date: 01/29/2022
6
6
---
@@ -15,6 +15,20 @@ You can deploy your application code from a local Git repository to Azure by con
15
15
|[!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"::: |
16
16
|[!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"::: |
17
17
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
+
18
32
### [Azure CLI](#tab/deploy-instructions-azcli)
19
33
20
34
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:
31
45
git remote add azure <git-deployment-url>
32
46
```
33
47
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).
0 commit comments