Day 1: GitHub Copilot Beginner Training – Introduction & Setup

๐ŸŸฆ Day 1: Introduction & Setup

๐ŸŽฏ Goal:

Understand what GitHub Copilot is, how it works, and set it up in your IDE (like VS Code).


๐Ÿ“Œ What is GitHub Copilot?

  • AI code assistant developed by GitHub and OpenAI.
  • Suggests code completions, functions, comments, and even whole files.
  • Learns from millions of public repositories and helps you write code faster.

๐Ÿ”ง Step 1: Install GitHub Copilot

๐Ÿ‘‰ For Visual Studio Code (VS Code)

  1. Open VS Code.
  2. Go to Extensions (Ctrl + Shift + X).
  3. Search for GitHub Copilot and click Install.
  4. After installing, you will be prompted to sign in with GitHub.
  5. Authorize GitHub Copilot when redirected to GitHub in your browser.

Official Docs: ๐Ÿ”— https://docs.github.com/en/copilot/getting-started-with-github-copilot


๐Ÿงช Step 2: Try Your First Copilot Suggestions

Open a new file (e.g., practice.py) and start with:

# Add two numbers

Now press Enter. Copilot should suggest something like:

def add(a, b):
    return a + b

If it doesn't, try pressing Tab or Ctrl + Enter to see suggestions.


๐Ÿง  Step 3: Understand How Copilot Works

  • Copilot reads your file content and comments to generate code.
  • It works best when you write descriptive comments or function names.
  • You can cycle through suggestions using Alt + [ and Alt + ].

✅ Practice Tasks for Day 1

Try writing the following in any programming language (Python, JS, etc.):

  1. # Check if a number is even or odd
  2. # Find the factorial of a number
  3. # Reverse a string
  4. # Count vowels in a string
  5. # Generate Fibonacci sequence

Let Copilot complete them. Modify a few and check if it adapts.


๐Ÿ” Optional Reading/Watching


Previous Post Next Post