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: docs/version-control/git-create-repository.md
+26-4Lines changed: 26 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -43,10 +43,6 @@ To follow this article, you'll need:
43
43
44
44
1. After you sign in and enter your repo info, select the **Create and Push** button to create your repo and add your app.
45
45
46
-
### Open an existing local repository
47
-
48
-
After you’ve created a repo or [cloned one](git-clone-repository.md), Visual Studio detects the Git repository and adds it to your list of **Local Repositories** in the Git menu. From there, you can quickly access and switch between your Git repositories.
49
-
50
46
## Create an Azure DevOps repo
51
47
52
48
1. Open Visual Studio, and then select **Create a new project**.
@@ -62,6 +58,32 @@ After you’ve created a repo or [cloned one](git-clone-repository.md), Visual S
62
58
63
59
1. Select the **Create and Push** button to create your repo and add your app.
64
60
61
+
## Work with local repos
62
+
63
+
To create a local repo:
64
+
65
+
1. From the **Git** menu, select **Create Git Repository**.
66
+
67
+
1. In the **Create a Git repository** dialog, under **Other**, choose **Local only**.
68
+
69
+
:::image type="content" source="media/vs-2022/git-repository-create-local.png" alt-text="Screenshot of the Create Git Repository screen, showing the Local only option.":::
70
+
71
+
1. Under **Initialize a local Git repository**, check the local path to the project, and modify any other settings if needed.
72
+
73
+
1. Select the **Create and Push** button to create your repo.
74
+
75
+
After you’ve created a repo or [cloned one](git-clone-repository.md), Visual Studio detects the Git repository and adds it to your list of **Local Repositories** in the Git menu. From there, you can quickly access and switch between your Git repositories.
76
+
77
+
## Add another repo to a solution
78
+
79
+
When you add a new project to an existing multi-repo solution, you might want to track that project in its own repository. To do so, follow these steps:
80
+
81
+
1. Add the project to the solution.
82
+
1. Close the solution.
83
+
1. Use **Open a local folder** to open the new project by itself.
84
+
1. Create a new repository using the methods described earlier in this article in GitHub, Azure DevOps, another Git hosting provider, or locally (the equivalent of `git init` from the command line).
85
+
1. Reopen the parent solution. The new project's repo will be included.
0 commit comments