Skip to content

CallMeGreg/copilot-zero-to-hero

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 

Repository files navigation

Welcome 👋

This guide was created for people in non-developer roles who want to start using Copilot in their day to day.

Step 1: Install, Update, and Setup Visual Studio Code

Click to expand

Now that GitHub Copilot is available in GitHub.com, you don't need to use an Integrated Developer Environment (IDE) like Visual Studio Code (VS Code) to use Copilot. However, VS Code offers some customization and functionality that you can't get in GitHub.com today.

If you don't have VS Code, you can download it here.

If you already have VS Code, make sure you update to the latest version:

  • With VS Code open, click the Code tab at the top left
  • Select Check for Updates...
  • If an update is available, apply it, then restart VS Code when prompted

Screenshot 2025-01-03 at 3 04 30 PM

  • In VS Code, let's create a new workspace to work through all of our exercises:
    • Select File --> Open Folder...
    • If needed, create a new folder so that you're working from a clean slate

Screenshot 2025-01-03 at 3 52 28 PM

Step 2: Install the GitHub Copilot Extension

Click to expand
  • Select the Extensions button from the left hand navigation bar

Screenshot 2025-01-03 at 2 46 57 PM

  • Search for "Copilot"
  • Click the Install button next to GitHub Copilot

Screenshot 2025-01-03 at 2 47 21 PM

  • In the Copilot panel on the right, select Sign in to Use Copilot

Screenshot 2025-01-03 at 2 47 45 PM

  • Select Continue next to your primary account

Screenshot 2025-01-03 at 2 48 11 PM

  • Select Continue again

Screenshot 2025-01-03 at 2 51 38 PM

Step 3: Getting familiar with Copilot

Click to expand
  • To ensure Copilot is properly authenticated, type "Hello" in the Copilot Chat window and hit enter.

Screenshot 2025-01-03 at 3 39 56 PM

  • If Copilot does not respond, or if you see an error, double check that:

    • You are authenticated with a GitHub account that has a Copilot license (click the Accounts icon at the bottom left)
    • You have the latest version of VS Code (click Code --> Check for updates...)
    • You have the latest version of the Copilot Extension (click Extensions --> GitHub Copilot --> Update or Restart Extensions)
    • You have restarted VS Code after applying any updates (click the Manage gear icon at the bottom left)
  • Copilot has some pre-defined shortcuts called slash commands. You can view all of the available slash commands by typing /help.

Screenshot 2025-01-03 at 3 47 38 PM

  • Two very helpful slash commands are /new and /explain.
    • /new is great when you need to create many files or a folder structure for a new project.
    • /explain is a quick way to have Copilot teach you more about what it generated, or to have Copilot summarize a large block of text/code.

Step 4: Draft markdown content

Click to expand

Sometimes you know what you want to cover, but not how you want to present it. I find that it can be easier tweaking something vs. designing from scratch.

For example, maybe you want to create a new README for your team's repository. Here are some prompts that got me to a great outline:

Create a template markdown file to be used as the readme for my team's GitHub repository.
It should include sections for our mission, what we do, and our team's pictures and contact information.
Include examples in each section.
Update the team picture to link to CallMeGreg's github profile picture
In the team pictures section, change the pictures to a table that also includes columns for their name, handle, and email address
Adjust the size of the picture to be smaller

After just a few back and forths, I was left with this markdown content:

Screenshot 2025-01-08 at 6 09 00 PM

Which looked like this in GitHub:

Screenshot 2025-01-08 at 6 09 32 PM

Step 5: Reformat into markdown

Click to expand

At GitHub, I find myself writing a lot of markdown between README's, issues, and discussions. However I prefer to take notes in Google Docs, and copying/pasting between the two can be really ugly.

This is an area where Copilot can help take the burden of reformatting off your plate.

When converting something to markdown, try the following prompt:

Can you convert the following notes into markdown format?
Use bulleted lists, use formatting to bold important parts, and include emojis in titles where appropriate.

<Paste in your raw notes here>

For example, starting with a Google Doc that looks like this:

Screenshot 2025-01-08 at 6 14 36 PM

This is what a direct copy and paste into GitHub Issues looks like ☹️

Screenshot 2025-01-08 at 6 17 02 PM

And here's what it looks like after using the simple Copilot prompt from above 🤩

Screenshot 2025-01-08 at 6 18 28 PM

Step 6: Copilot reviews

Click to expand

On top of helping you write and format content, Copilot can review content for typos, style, and clarity.

We can also customize what Copilot looks for in its reviews by specifying review instructions.

Navigate to the VS Code Extensions tab and search for Copilot. Then click the Manage gear icon next to GitHub Copilot Chat.

Screenshot 2025-01-10 at 10 33 25 AM

Scroll down to the section labeled Github › Copilot › Chat › Review Selection: Instructions. Be sure to find "Review Selection", and not one of the other instructions sections for other things like code generation and test generation.

Click Edit in settings.json.

Screenshot 2025-01-10 at 10 34 33 AM

If you're offered a quick selection, choose one of the options that start with "text", then modify the instructions to your liking. Or manually update the github.copilot.chat.reviewSelection.instructions section to look like this:

    "github.copilot.chat.reviewSelection.instructions": [
        {
            "text": "Look for spelling and grammar mistakes, refine for clarity, and add emojis where appropriate."
        }
    ],

Save the settings.json file and go back to a file that you would like to review.

Highlight all of the text that you want Copilot to review, then right click and select Copilot --> Review and Comment

Screenshot 2025-01-10 at 10 50 46 AM

You can quickly apply or discard suggestions with the Apply and Discard buttons, jump between suggestions with the arrows, move a comment to that Chat window, or discard all suggestions and return to edit mode.

Screenshot 2025-01-10 at 10 53 10 AM

Step 7: Create an issue template

Click to expand

Issue templates are a great way to streamline collection of GitHub Issues in a consistent fashion.

Copilot can help elevate your issue template game by providing the boilerplate code needed for issue forms, rather than using markdown / markdown comments in your templates.

Start by prompting Copilot with a rough outline of what you want to achieve, being as specific as possible about default labels, assignees, and the form fields you want to include.

I want to create a GitHub issue template using an issue form.
The form will be used to capture feedback about our recent team offsite.
Include the default label "Offsite Feedback" and assign the issue to CallMeGreg.
The form should have fields for an overall rating 1-10, a text box for what went well, and a text box for what could be improved next time.
Also, include a required dropdown selection for which specific team the user is a part of: Engineering, Product, or Design.

Remember, Copilot might not get it exactly right the first time. Ask follow up questions to fix errors, adjust styling, add ghost text, change the order of the fields...you're the pilot!

With the prompt from above, I ended up with a new issue template that looks like this:

Screenshot 2025-01-10 at 11 08 55 AM

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published