Ai Coding Tools

How to Use GitHub Copilot to Write Quality Code in 2 Hours

By BTW Team4 min read

Comparing tools? See the AI tools tested on the show.

In short

A step-by-step tutorial on leveraging GitHub Copilot to significantly improve your coding productivity in just two hours.

As a solo founder or indie hacker, you’re constantly looking for ways to maximize your coding productivity. Enter GitHub Copilot—a tool that promises to make coding faster and easier by suggesting lines of code as you type. But does it really deliver? After spending some time with it, I can tell you that it can indeed help you write quality code in just two hours. Here’s how to get started.

Prerequisites: What You Need

Before diving in, make sure you have the following:

  • GitHub Account: You’ll need this to access Copilot.
  • Visual Studio Code: Copilot works best with this IDE.
  • Copilot Subscription: As of 2026, it's priced at $10/month, with a free trial for 60 days.
  • Basic Coding Knowledge: Familiarity with the programming language you’re using will help you leverage Copilot effectively.

Step 1: Installation and Setup (30 Minutes)

  1. Sign Up for GitHub Copilot: Go to the GitHub Copilot page and click on “Sign Up.”
  2. Install the Extension: In Visual Studio Code, navigate to the Extensions tab (Ctrl+Shift+X), search for “GitHub Copilot,” and install it.
  3. Authenticate: Once installed, authenticate your GitHub account to link Copilot to your IDE.

Expected Output: You should see Copilot suggestions as you start typing code.

Step 2: Start Coding with Copilot (1 Hour)

Writing Functions

Begin by writing a function header or comment describing what you want to achieve. For example, typing // function to fetch user data will prompt Copilot to suggest a function implementation.

Iterating on Suggestions

  1. Use Tab to Accept Suggestions: If you like Copilot’s suggestion, simply press Tab to accept it.
  2. Modify as Needed: Don't hesitate to tweak the suggested code. Copilot works best when you provide context.

Testing the Code

After writing a section of code, run it to see if it behaves as expected. If you encounter errors, Copilot can often suggest alternative implementations.

Expected Output: A working function that fetches user data, complete with error handling if you’ve set it up correctly.

Step 3: Troubleshooting Common Issues (20 Minutes)

What Could Go Wrong

  • Irrelevant Suggestions: Sometimes, Copilot might suggest code that doesn’t fit your context. If this happens, try rephrasing your comments or providing more context.
  • Code Quality: While Copilot is generally good, it can produce inefficient code. Always review and optimize the suggestions.

Solutions

  • Iterate on Comments: Be specific in your comments to guide Copilot better.
  • Use Debugger Tools: Visual Studio Code has built-in debugging tools that can help identify issues in your code.

What's Next: Scaling Your Use of Copilot

Once you’ve gotten the hang of using Copilot, consider these next steps:

  • Explore Advanced Features: Copilot can assist with complex code patterns and even learn from your coding style over time.
  • Team Collaboration: If you're working on a project with others, encourage your team to use Copilot for consistency and efficiency.

Pricing Breakdown

| Feature | Pricing | Best For | Limitations | Our Take | |------------------|-------------------------------------------|----------------------------------|----------------------------------------|------------------------------------| | GitHub Copilot | $10/mo, free 60-day trial | Individual developers | Not suitable for all languages | We use it for rapid prototyping | | Alternative 1 | TabNine: $12/mo | Multi-language support | May not integrate as seamlessly | We don’t use it because it lacks context | | Alternative 2 | Codeium: Free tier + $15/mo Pro | Budget-friendly options | Limited features in free tier | We haven't tried it yet |

Conclusion: Start Here

To make the most of GitHub Copilot, spend two hours following this guide. With just a bit of setup and some basic coding skills, you can significantly enhance your coding productivity. Remember to review the suggestions carefully and adapt them to your needs. GitHub Copilot isn’t perfect, but it can be a powerful ally in your development toolkit.

Watch real AI builds every week

Built This Week is a weekly podcast where Jordan Metzner and Sam Nadler build something real with AI every episode, test new AI tools and talk with founders who build with AI.

See the tools

Watch real AI builds every week

Built This Week is a weekly podcast where Jordan Metzner and Sam Nadler build something real with AI every episode, test new AI tools and talk with founders who build with AI.

See the tools
Ai Coding Tools

3 AI Coding Tools That Are Overrated (and Why You Should Avoid Them)

3 AI Coding Tools That Are Overrated (and Why You Should Avoid Them) In the everevolving landscape of AI coding tools, it's easy to get swept up in the hype. As indie hackers and s

Nov 30, 20263 min read
Ai Coding Tools

5 Ways AI Coding Tools Can Accelerate Your MVP Development in 2026

5 Ways AI Coding Tools Can Accelerate Your MVP Development in 2026 In 2026, the landscape for indie hackers and solo founders has evolved significantly, especially with the advent

Nov 26, 20264 min read
Ai Coding Tools

5 AI Coding Tools That Make Legacy Code Feel Brand New in 2026

5 AI Coding Tools That Make Legacy Code Feel Brand New in 2026 If you’re a developer stuck maintaining legacy code, you know the frustration. It’s like navigating a maze blindfolde

Nov 23, 20264 min read
Ai Coding Tools

10 AI Coding Tools That Will Save You Hours of Debugging in 2026

10 AI Coding Tools That Will Save You Hours of Debugging in 2026 Debugging can feel like a neverending cycle of frustration. Whether you're a solo founder or an indie hacker, spend

Nov 18, 20265 min read
Ai Coding Tools

10 Common Mistakes When Using AI Coding Tools for MVP Development

10 Common Mistakes When Using AI Coding Tools for MVP Development As a founder in 2026, you’re likely aware that AI coding tools can significantly speed up the MVP development proc

Nov 16, 20264 min read
Ai Coding Tools

5 AI Coding Myths Every Beginner Developer Should Ditch in 2026

5 AI Coding Myths Every Beginner Developer Should Ditch in 2026 As a beginner developer, you’ve probably come across a ton of buzz surrounding AI coding tools. But with all the hyp

Nov 12, 20263 min read