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: 03-Introduction-to-GitHub-Copilot/README.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,20 +38,20 @@ By the end of this module, you'll be able to:
38
38
39
39
### How to start this course
40
40
41
-
[](https://codespaces.new/microsoft/mastering-github-copilot-for-dotnet-csharp-developers)
41
+
[](https://codespaces.new/microsoft/mastering-github-copilot-for-dotnet-csharp-developers?devcontainer_path=.devcontainer%2Fintroduction%2Fdevcontainer.json)
42
42
43
43
Now that you've learned about GitHub Codespaces and GitHub Copilot, let's take the next step and use Codespaces to complete hands-on labs with GitHub Copilot. Right-click **Open in GitHub Codespaces** and open the link in a new tab.
44
44
45
45
### 🗃️ Lessons
46
46
|| Lesson Link | Concepts Taught | Learning Goal |
| 01 |[Leverage Codespaces with VS Code for Copilot](https://github.com/microsoft/mastering-github-copilot-for-dotnet-csharp-developers/blob/main/03-Introduction-to-GitHub-Copilot/.github/steps/1-copilot-extension.md)| Learn how to set up and enable GitHub Copilot within a Codespace using VS Code by configuring a development container and installing necessary extensions.| This guide enable developers to leverage GitHub Codespaces and VS Code to integrate and utilize GitHub Copilot for AI-powered code suggestions efficiently. |
49
-
| 02 |[Seeing AI code suggestions in a C# file!](https://github.com/microsoft/mastering-github-copilot-for-dotnet-csharp-developers/blob/main/03-Introduction-to-GitHub-Copilot/.github/steps/2-skills-dotnet.md)| Setting up a Codespace with GitHub Copilot, creating a C# project, using Copilot for code suggestions, and pushing code to a repository using Git. | Familiarize users with GitHub Copilot's AI-powered code suggestions in C# by creating a .NET project, generating code completions, and pushing changes to a repository using Git. |
50
-
| 03 |[View the GitHub Copilot tab with multiple suggestions](https://github.com/microsoft/mastering-github-copilot-for-dotnet-csharp-developers/blob/main/03-Introduction-to-GitHub-Copilot/.github/steps/3-copilot-hub.md)| Learn how to use GitHub Copilot for AI-powered code suggestions in C#, manage a Codespace, pull the latest code, create and edit files, review AI-generated code completions, and push changes to a Git repository using Git commands in VS Code. | Familiarize users with GitHub Copilot’s code suggestions, how to review and accept AI-generated completions, and how to manage code changes in a GitHub Codespace using Git commands. |
51
-
| 04 |[Using comments to generate code with Copilot](https://github.com/microsoft/mastering-github-copilot-for-dotnet-csharp-developers/blob/main/03-Introduction-to-GitHub-Copilot/.github/steps/4-copilot-comment.md)| Understand how to use GitHub Copilot to generate code from comments, navigating Copilot suggestions, and managing code versioning with Git commands in a Codespace environment. | Using comments to generate AI-suggested code with GitHub Copilot in VS Code |
48
+
| 01 |[Leverage Codespaces with VS Code for Copilot](https://github.com/microsoft/mastering-github-copilot-for-dotnet-csharp-developers/blob/main/03-Introduction-to-GitHub-Copilot/steps/1-copilot-extension.md)| Learn how to set up and enable GitHub Copilot within a Codespace using VS Code by configuring a development container and installing necessary extensions.| This guide enable developers to leverage GitHub Codespaces and VS Code to integrate and utilize GitHub Copilot for AI-powered code suggestions efficiently. |
49
+
| 02 |[Seeing AI code suggestions in a C# file!](https://github.com/microsoft/mastering-github-copilot-for-dotnet-csharp-developers/blob/main/03-Introduction-to-GitHub-Copilot/steps/2-skills-dotnet.md)| Setting up a Codespace with GitHub Copilot, creating a C# project, using Copilot for code suggestions, and pushing code to a repository using Git. | Familiarize users with GitHub Copilot's AI-powered code suggestions in C# by creating a .NET project, generating code completions, and pushing changes to a repository using Git. |
50
+
| 03 |[View the GitHub Copilot tab with multiple suggestions](https://github.com/microsoft/mastering-github-copilot-for-dotnet-csharp-developers/blob/main/03-Introduction-to-GitHub-Copilot/steps/3-copilot-hub.md)| Learn how to use GitHub Copilot for AI-powered code suggestions in C#, manage a Codespace, pull the latest code, create and edit files, review AI-generated code completions, and push changes to a Git repository using Git commands in VS Code. | Familiarize users with GitHub Copilot’s code suggestions, how to review and accept AI-generated completions, and how to manage code changes in a GitHub Codespace using Git commands. |
51
+
| 04 |[Using comments to generate code with Copilot](https://github.com/microsoft/mastering-github-copilot-for-dotnet-csharp-developers/blob/main/03-Introduction-to-GitHub-Copilot/steps/4-copilot-comment.md)| Understand how to use GitHub Copilot to generate code from comments, navigating Copilot suggestions, and managing code versioning with Git commands in a Codespace environment. | Using comments to generate AI-suggested code with GitHub Copilot in VS Code |
52
52
53
53
54
-
## :books: Additional learning and resources
54
+
## 📚 Additional learning and resources
55
55
56
56
-[What is GitHub Copilot](https://docs.github.com/en/copilot/about-github-copilot/what-is-github-copilot)
57
57
-[About enterprise accounts for Copilot Business](https://docs.github.com/en/enterprise-cloud@latest/admin/copilot-business-only/about-enterprise-accounts-for-copilot-business)
The first step is always the hardest, so pick something easy!
5
-
Link to docs.github.com for further explanations.
6
-
Encourage users to open new tabs for steps!
7
-
-->
8
-
9
1
## Step 1: Leverage Codespaces with VS Code for Copilot
10
2
11
3
_Welcome to "Develop With AI Powered Code Suggestions Using GitHub Copilot and VS Code"! :wave:_
@@ -21,22 +13,17 @@ Using Copilot inside a Codespace shows just how easy it is to get up and running
21
13
> **Note**
22
14
> This skills exercise will focus on leveraging GitHub Codespace. It is recommended that you complete the GitHub skill, [Codespaces](https://github.com/skills/code-with-codespaces), before moving forward with this exercise.
23
15
24
-
### :keyboard: Activity: Enable Copilot inside a Codespace
16
+
### ⌨️ Activity: Enable Copilot inside a Codespace
25
17
26
18
**We recommend opening another browser tab to work through the following activities so you can keep these instructions open for reference.**
27
19
28
20
Before you open up a codespace on a repository, you can create a development container and define specific extensions or configurations that will be used or installed in your codespace. Let's create this development container and add copilot to the list of extensions.
29
21
30
-
1. Navigating back to your **Code** tab of your repository, click the **Add file** drop-down button, and then click `Create new file`.
31
-
1. Type or paste the following in the empty text field prompt to name your file.
32
-
```
33
-
.devcontainer/devcontainer.json
34
-
```
35
-
1. In the body of the new **.devcontainer/devcontainer.json** file, add the following content:
22
+
1. In the body of the **.devcontainer/introduction/devcontainer.json** file, add the following content:
36
23
```
37
24
{
38
25
// Name this configuration
39
-
"name": "Codespace for Skills!",
26
+
"name": "Introduction to Copilot",
40
27
"customizations": {
41
28
"vscode": {
42
29
"extensions": [
@@ -47,17 +34,21 @@ Before you open up a codespace on a repository, you can create a development con
47
34
}
48
35
}
49
36
```
50
-
1. Select the option to **Commit directly to the `main` branch**, and then click the **Commit new file** button.
37
+
1. Select the option to **Commit directly to the `main` branch**, and then click the **Commit** button.
38
+
1. Reload the codespace
39
+
40
+
If you run into issues you can create a new codespace:
41
+
51
42
1. Navigate back to the home page of your repository by clicking the **Code** tab located at the top left of the screen.
52
43
1. Click the **Code** button located in the middle of the page.
53
44
1. Click the **Codespaces** tab on the box that pops up.
54
-
1. Click the **Create codespace on main** button.
45
+
1. Click the **Create codespace on main** button and select Introduction to Copilot.
55
46
56
47
**Wait about 2 minutes for the codespace to spin itself up.**
57
48
58
49
1. Verify your codespace is running. The browser should contain a VS Code web-based editor and a terminal should be present such as the below:
59
-

50
+

60
51
1. The `copilot` extension should show up in the VS Code extension list. Click the extensions sidebar tab. You should see the following:
61
-

52
+

62
53
63
-
**Wait about 60 seconds then refresh your repository landing page for the next step.**
54
+
Head to [Part 2 of the Exercise](./2-skills-dotnet.md)
Copy file name to clipboardExpand all lines: 03-Introduction-to-GitHub-Copilot/steps/3-copilot-hub.md
+4-20Lines changed: 4 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,27 +1,10 @@
1
-
<!--
2
-
<<< Author notes: Step 3 >>>
3
-
Start this step by acknowledging the previous step.
4
-
Define terms and link to docs.github.com.
5
-
-->
6
-
7
1
## Step 3: View the GitHub Copilot tab with multiple suggestions
8
2
9
3
_Nice work! You just used AI code suggestions within a C# file by using GitHub Copilot :sparkles:_
10
4
11
5
Keep in mind that as you continue to use copilot, you may not want some of the suggestions GitHub Copilot offers. GitHub Copilot will show you multiple suggestions in a new tab.
12
6
13
-
### :keyboard: Activity: Pull the latest code to the Codespace repo.
14
-
15
-
> **Note**
16
-
> Pull MUST be done prior to the next activity.
17
-
18
-
1. Use the VS Code terminal to pull the latest code:
19
-
20
-
```
21
-
git pull
22
-
```
23
-
24
-
### :keyboard: Activity: Add another C# method and view all suggestions
7
+
### ⌨️ Activity: Add another C# method and view all suggestions
25
8
26
9
1. From inside the codespace in the Solution Explorer, right click on the project, create a new file.
27
10
@@ -43,7 +26,7 @@ Keep in mind that as you continue to use copilot, you may not want some of the s
43
26
7. Find a solution you like and click `Accept Solution`.
44
27
8. Your `Member.cs` file will be updated with your solution.
45
28
46
-
### :keyboard: Activity: Push code to your repository from the codespace
29
+
### ⌨️ Activity: Push code to your repository from the codespace
47
30
48
31
1. Use the VS Code terminal to add the `Member.cs` file to the repository:
49
32
@@ -63,4 +46,5 @@ Keep in mind that as you continue to use copilot, you may not want some of the s
63
46
git push
64
47
```
65
48
66
-
**Wait about 60 seconds then refresh your repository landing page for the next step.**
49
+
50
+
Head to [Part 4 of the Exercise](./4-copilot-comment.md)
0 commit comments