How to setup azure repos with VS code?
- Work Process - Purpose
- This page will show the setup steps about the VS code working environment for EGIS developers;
- Work Process - Summary
- Basic steps are:
- download and install vs code;
- link to Azure cloud;
- add python setting;
- steps for code update submit process and merge;
- Basic steps are:
- Contribution Of The Client Group To The Work Process
- Bill Xu
- Lawrence Chong
- Steps Of The Work Process
- Installation and setup:
- download and install vs code;
- https://code.visualstudio.com/
Azure Extensions
You can use Azure directly from Visual Studio Code through extensions.
- You must install the Azure Git Repos extension and following the instruction in this extension to setup the repos correctly:
- download and install vs code;
- Installation and setup:
The org in the steps is: https://dev.azure.com/TCOPP
Create token by go to https://dev.azure.com/TCOPP/_usersSettings/about; click the Personal access tokens , create new token by use your name;
Additional: Using either the Azure CLI or the Azure App Service, Git Merger extension, you can have your application running in Azure in minutes.
- https://code.visualstudio.com/docs/azure/extensions
- link to Azure cloud;
Configuring Visual Studio Code
Open Visual Studio Code. In this task, you will configure a Git credential helper to securely store the Git credentials used to communicate with Azure DevOps. If you have already configured a credential helper and Git identity, you can skip to the next task.
From the main menu, select Terminal | New Terminal to open a terminal window.
Execute the command below to configure a credential helper.
git config --global credential.helper wincred
The commands below will configure your user name and email for Git commits. Replace the parameters with your preferred user name and email and execute them.
git config --global user.name "Bill Xu"
git config --global user.email bill.xu@034gc.onmicrosoft.com
Cloning an existing repository
In a browser tab, navigate to your team project on Azure DevOps.
Getting a local copy of a Git repo is called “cloning”. Every mainstream development tool supports this and will be able to connect to Azure Repos to pull down the latest source to work with. Navigate to the Repos hub.
Click Clone.
You can directly Clone to VS Code or follow these:
Click the Copy to clipboard button next to the repo clone URL. You can plug this URL into any Git-compatible tool to get a copy of the codebase.
Open an instance of Visual Studio Code.
Press Ctrl+Shift+P to show the Command Palette. The Command Palette provides an easy and convenient way to access a wide variety of tasks, including those provided by 3rd party extensions.
Execute the Git: Clone command. It may help to type “Git” to bring it to the shortlist.
Paste in the URL to your repo and press Enter.
Select a local path to clone the repo to.
When prompted, log in to your Azure DevOps account.
Once the cloning has completed, click Open Repository. You can ignore any warnings raised about opening the projects. The solution may not be in a buildable state, but that’s okay since we’re going to focus on working with Git and building the project itself is not necessary.
- https://www.develves.net/blogs/asd/articles/using-git-with-powershell-on-windows-10/
- steps for code update submit process and merge;