What is the URL for a new Azure DevOps Git repos if the project is in Visual Studio on my local machine? Where do you get this URL?
Asked
Active
Viewed 7,277 times
0
-
You have to decide what the URL is going to be, by figuring out what the address is of the remote repository to which you will be pushing your project. – Tim Biegeleisen Sep 16 '18 at 15:17
-
1Possible duplicate of [How to Import project code from local machine to Azure Repos?](https://stackoverflow.com/questions/52334570/how-to-import-project-code-from-local-machine-to-azure-repos) – Daniel Mann Sep 16 '18 at 19:23
2 Answers
1
If you mean that your project already exists locally and you want to push it to Azure's Git service, then:
- Create a new repo from the Azure console.
- From the top right corner, click the Clone button.
- Copy the HTTPS or SSH URL (depending on your preferred method). It should be something like
https://[user]@dev.azure.com/[org|user]/[project]/_git/[repo]
orgit@ssh.dev.azure.com:v3/[user|org]/[project]/[repo]
respectively.
- In your local terminal, run
git remote add origin [url]
Where url
is the URL for your repo copied from the Azure console.

Mig82
- 4,856
- 4
- 40
- 63
0
If you created the repo locally (such as via git init
), it's not in Azure DevOps/VSTS.
You'll need to create a repo in Azure DevOps/VSTS, add a remote in your local repo, and push your local repo to the server.
When you create an empty repo in Azure DevOps/VSTS, it will give you precise instructions for how to do this.

Daniel Mann
- 57,011
- 13
- 100
- 120
-
I don't know how to: * create an empty repo in Azure DevOps without a URL * formulate the URL for the empty repro * or push my local repo to the server I just want to put my VS project code into Azure DevOps repo. How does one do this? Why is it so difficult to do (many steps, not well documented) ? – Don Baechtel Sep 16 '18 at 19:05
-
-
https://learn.microsoft.com/en-us/azure/devops/repos/git/create-new-repo?view=vsts – Daniel Mann Sep 16 '18 at 19:08
-
1Let's go back to the original question. I have a project locally in Visual Studio 2017 and I want to put it in Azure DevOps. What are the steps required to do this? – Don Baechtel Sep 16 '18 at 19:10
-
@DonBaechtel My answer and the documentation explains the process. Create a repo in Azure Devops, add a remote to your local repo, then push it to Azure Devops. – Daniel Mann Sep 16 '18 at 19:16