Skip to content

Commit 6daa2fe

Browse files
committed
fixes
1 parent 58c184c commit 6daa2fe

File tree

2 files changed

+27
-26
lines changed

2 files changed

+27
-26
lines changed

docs/repos/git/import-git-repository.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,32 +21,34 @@ This article shows you how to import an existing Git repo from GitHub, Bitbucket
2121

2222
[!INCLUDE [azure-repos-prerequisites](includes/azure-repos-prerequisites.md)]
2323

24+
## Import into a new repo
25+
26+
Do the following steps to import into a new repo:
27+
2428
> [!NOTE]
2529
> When the import of the repository is completed, Azure DevOps sets the **Default** branch for that imported repository. If the imported repository contains a branch named `main`, it gets set as the default branch, otherwise the first branch (in alphabetical order) of the imported repository gets set as **Default**.
2630
27-
## Import into a new repo
31+
1. In your browser, sign in to your organization and select **Repos** > **Files**.
2832

29-
1. In your browser, sign in to your organization and select **Repos**, **Files**.
30-
31-
![View your branches](media/repos-navigation/repos-files.png)
33+
![Screenshot shows view of branches.](media/repos-navigation/repos-files.png)
3234

3335
2. From the repo drop-down, select **Import repository**.
3436

35-
![Manage repositories](media/repo-mgmt/import-repository.png)
37+
![Screenshot shows Manage repositories screen.](media/repo-mgmt/import-repository.png)
3638

37-
3. If the source repo is publicly available, just [enter the clone URL](clone.md#clone_url) of the source repository and a name for your new Git repository.
39+
3. [Enter the clone URL](clone.md#clone_url) of the source repository and a name for your new Git repository.
3840

39-
If the source repository is private but can be accessed using basic authentication (username-password, Microsoft Entra ID tokens, personal access tokens, and so on), select **Requires authorization** and enter your credentials. For enhanced security, we recommend using Microsoft Entra ID tokens when possible. SSH authentication isn't supported, but you can manually import a repository that uses SSH authentication by following the steps in [Manually import a repo using git CLI](#manual-import-git-cli).
41+
![Screenshot shows Import Repository Dialog with publicly available sample repo URL.](media/Import-Repo/ImportRepoDialog.png)
4042

41-
![Import Repository Dialog](media/Import-Repo/ImportRepoDialog.png)
43+
4. Select **Import a repository**.
4244

43-
::: moniker-end
45+
The repo gets imported.
4446

4547
## Import into an existing empty repo
4648

4749
On the **Files** page of the empty Git repository, select **Import** and [enter the clone URL](clone.md#clone_url). Provide credentials if the source repository requires authentication.
4850

49-
![Import Repository into an existing repository](media/Import-Repo/ImportRepofromEmptyRepo.png)
51+
![Screenshot shows Import Repository into an existing repository.](media/Import-Repo/ImportRepofromEmptyRepo.png)
5052

5153
> [!NOTE]
5254
> The import feature disables automated linking for work items mentioned in a commit comment since the work item IDs in the destination project might not be the same as ones in the source project. Automatic linking for work items mentioned in a commit can be re-enabled by navigating to **Settings**, **Version Control**, selecting your repository, and choosing **Options**. For more information on linking commits with work items, see [Link work items to commits](share-your-code-in-git-vs.md#link-work-items)
@@ -57,8 +59,7 @@ On the **Files** page of the empty Git repository, select **Import** and [enter
5759

5860
You can use [az repos import](/cli/azure/repos/import#az-repos-import-create) to import a repository to your Azure DevOps project.
5961

60-
> [!NOTE]
61-
> You must first create the repository in Azure DevOps before you can import a Git repository. Also, the repository you create must be empty. To create a repo, see [Create your Git repo in Azure Repos](share-your-code-in-git-cmdline.md#create-your-git-repo-in-azure-repos).
62+
You must first create the repository in Azure DevOps before you can import a Git repository. Also, the repository you create must be empty. To create a repo, see [Create your Git repo in Azure Repos](share-your-code-in-git-cmdline.md#create-your-git-repo-in-azure-repos).
6263

6364
```azurecli
6465
az repos import create --git-source-url

docs/repos/git/require-branch-folders.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -55,29 +55,29 @@ Before you begin, ensure you have the following items:
5555
Run the following commands in the Developer Command Prompt, under **Start** > **Visual Studio** > **Developer Command Prompt**.
5656
Each command includes an explanation of what it's doing. If you don't have a token cached, for example by signing in to the Azure DevOps Services web portal, you're prompted to sign in.
5757

58-
First, block the Create Branch permission at the repository root for the project's contributors.
58+
1. Block the Create Branch permission at the repository root for the project's contributors:
5959

6060
```
6161
tf git permission /deny:CreateBranch /group:[FabrikamProject]\Contributors /collection:https://dev.azure.com/fabrikam-fiber/ /teamproject:FabrikamProject /repository:FabrikamRepo
6262
```
6363

64-
Then, allow contributors to create branches under `feature` and `users`.
64+
2. Allow contributors to create branches under `feature` and `users`:
65+
a. **Feature:**
66+
```
67+
tf git permission /allow:CreateBranch /group:[FabrikamProject]\Contributors /collection:https://dev.azure.com/fabrikam-fiber/ /teamproject:FabrikamProject /repository:FabrikamRepo /branch:feature
68+
```
69+
b. **Users:**
70+
```
71+
tf git permission /allow:CreateBranch /group:[FabrikamProject]\Contributors /collection:https://dev.azure.com/fabrikam-fiber/ /teamproject:FabrikamProject /repository:FabrikamRepo /branch:users
72+
```
6573
66-
```
67-
tf git permission /allow:CreateBranch /group:[FabrikamProject]\Contributors /collection:https://dev.azure.com/fabrikam-fiber/ /teamproject:FabrikamProject /repository:FabrikamRepo /branch:feature
68-
```
69-
70-
```
71-
tf git permission /allow:CreateBranch /group:[FabrikamProject]\Contributors /collection:https://dev.azure.com/fabrikam-fiber/ /teamproject:FabrikamProject /repository:FabrikamRepo /branch:users
72-
```
73-
74-
Allow administrators to create branches under `release`.
74+
3. Allow administrators to create branches under `release`:
7575
7676
```
7777
tf git permission /allow:CreateBranch /group:"[FabrikamProject]\Project Administrators" /collection:https://dev.azure.com/fabrikam-fiber/ /teamproject:FabrikamProject /repository:FabrikamRepo /branch:release
7878
```
7979
80-
Finally, allow administrators to create a branch called `main` (in case it ever gets accidentally deleted).
80+
4. Allow administrators to create a branch called `main`, in case it ever gets accidentally deleted.
8181
8282
```
8383
tf git permission /allow:CreateBranch /group:"[FabrikamProject]\Project Administrators" /collection:https://dev.azure.com/fabrikam-fiber/ /teamproject:FabrikamProject /repository:FabrikamRepo /branch:main
@@ -108,14 +108,14 @@ tf git permission /allow:CreateBranch /group:"[FabrikamProject]\Project Administ
108108
> Any custom permissions or branch policies don't migrate.
109109
110110
#### [Command Line](#tab/command-line/)
111-
First, make sure you have the latest set of branches:
111+
1. Make sure you have the latest set of branches:
112112
113113
```
114114
cd {your_repo}
115115
git fetch
116116
```
117117
118-
Then, repeat these commands for each branch you want to migrate:
118+
2. Repeat these commands for each branch you want to migrate:
119119
120120
```
121121
git branch -m {old_branch_name} {new_branch_name}

0 commit comments

Comments
 (0)