How to do it...

  1. In your web browser, navigate to https://dev.azure.com and log in with your Azure DevOps account.
  2. Open the televisionShow project.
  3. On the left side menu, select Repos | Files.
  4. At the top of the screen, make sure that the televisionShow repository is selected:

  1. In the top-right corner of the screen, select Clone.
  2. In the Clone repository window, copy the HTTPS URL value for the repository:

Example: https://<yourOrganization>@dev.azure.com/<yourOrganization/televisionShow/_git/televisionShow

  1. Open Visual Studio Code and press Ctrl + Shift + P. Type in and select Git: Clone from the menu.
  2. Paste in the repository HTTPS URL value that you copied in Step 6 and press Enter.
  1. Choose a folder where you still store the repository and press Select Repository LocationDo not select the folder that you extracted from 3-connect-al-project-to-azure-devops-start.zip.
Visual Studio Code will create a folder containing the repository name at the location you specify.
  1. When prompted, sign in with your Azure DevOps account.
  2. After a few moments, you will be presented with the following dialog. Click Open Repository:

You should now see your empty code repository, with the exception—of course—of the README.md file that we initialized the repository with:

  1. Now, let's add our Television Show project files to the repository. Copy the contents of the televisionShow folder that you extracted from 3-connect-al-project-to-azure-devops-start.zip and paste it into the root of the code repository folder that Visual Studio Code created. It should look like this:

I deleted the README.md file; you can too if you wish.

I find the best way to perform file tasks such as this is to simply use Windows File Explorer. You can just copy/paste the files and folders from the extracted folders to the repository folder, and then switch back to Visual Studio Code to see the results.

When you drag/drop folders into the Visual Studio Code interface, it will not actually copy the folder contents, but instead, will add the contents to a Visual Studio Code workspace, which is not what we want in this case.
  1. Connect the project to your AL development sandbox by either reusing a previous launch.json and placing it in the project, or creating a new one. Once it is connected, download the AL symbols to the project.
  1. Now that we have our code in the right folder, we need to commit it and push it to our Azure DevOps repository. In Visual Studio Code, on the left side menu, click the Source Control () icon.
  1. In the message box, type in initial checkin and press Ctrl + Enter.
This will commit the files to your local Git code repository, but not yet in Azure DevOps.
  1. In the bottom-left corner of the Visual Studio Code application window, you will see the following indicator, which tells you that you have one commit that is pending to be pushed to your Azure DevOps repository:

Click the indicator to push the commit up to Azure DevOps.

The other digit of the indicator tells you whether you have any pending commits to pull down from your Azure DevOps repository. Clicking on the indicator does both a push and pull to try and sync everything.

  1. In Azure DevOps, navigate to the televisionShow repository files. You should now see the files that you pushed from your local machine:

You may have noticed that the .alPackages and .vscode folders are not in the Azure DevOps repository. This is because of the .gitignore file.

You don't typically want to store any of the local configuration or binary files in your repository. With the .gitignore file, you can configure Git to ignore specific files and folders so that they are not included in any source control activities.

You can open the .gitignore file in Visual Studio Code to check out the contents.

Now, any changes that you make to the Television Show project on your local machine can be pushed up to Azure DevOps!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.203.68