๐ฆ 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)
- Open VS Code.
- Go to Extensions (Ctrl + Shift + X).
- Search for
GitHub Copilotand click Install. - After installing, you will be prompted to sign in with GitHub.
- 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 + [andAlt + ].
✅ Practice Tasks for Day 1
Try writing the following in any programming language (Python, JS, etc.):
# Check if a number is even or odd# Find the factorial of a number# Reverse a string# Count vowels in a string# Generate Fibonacci sequence
Let Copilot complete them. Modify a few and check if it adapts.
๐ Optional Reading/Watching
Tags:
GitHub Copilot