Visual Studio Code - Git Create new repo in on-prem Azure Devops
May 6, 2026
Create a new repo in the web portal and push code
This is the standard approach for managing new code in Azure DevOps.
- Navigate to your project: Open the web portal for your Azure DevOps Server and select your project.
- Go to Repos: In the left-hand navigation menu, select Repos > Files.
- Create a new repository: From the current repository drop-down menu at the top, select New repository.
- Configure the new repo:
- Verify that Git is the repository type.
- Enter a name for your new repository.
- Optionally, add a README file or a
.gitignore file.
- Create: Select Create. An empty Git repo is now ready in your project.
- Clone the repo locally: Once the repo is created, an overview page will appear with a Clone button. Copy the provided clone URL.
- Open a command prompt on your local machine and navigate to the folder containing your local code (if you have existing code).
- Connect your local repo to the remote:
git init git add . git commit -m 'initial commit' git branch -M main git remote add origin <clone URL> git push -u origin main
- Run
git remote add origin <clone URL> means that you can use the clone URL from within Azure DevOps - Run
git push -u origin [main] (or the name of your default branch) to push your local code to the newly created Azure DevOps repo.