Ai Coding Tools

How to Use GitHub Copilot to Improve Your 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 guide on leveraging GitHub Copilot effectively to enhance your coding skills within a short timeframe.

If you're a solo founder or indie hacker, you know that time is of the essence. When it comes to coding, every minute counts. That's where GitHub Copilot comes in. This AI-powered coding assistant can help you write better code, faster. But how do you actually use it effectively? In this guide, I’ll show you how to set up and maximize GitHub Copilot in just 2 hours.

Prerequisites: What You Need to Get Started

Before diving in, make sure you have the following:

  • GitHub Account: You’ll need this to access Copilot.
  • Visual Studio Code (VSCode): The most popular code editor that integrates well with Copilot.
  • GitHub Copilot Subscription: As of July 2026, this costs $10/month or $100/year. There’s a free trial available for new users.
  • Basic Coding Knowledge: Familiarity with at least one programming language is essential.

Step 1: Install GitHub Copilot

  1. Open Visual Studio Code: If you don’t have it installed, download it from here.
  2. Go to Extensions: Click on the Extensions view icon in the Sidebar or press Ctrl+Shift+X.
  3. Search for GitHub Copilot: Type "GitHub Copilot" in the search bar and click on the install button.
  4. Sign In: After installation, you'll be prompted to sign in to your GitHub account. Follow the instructions to complete the process.

Expected Output: You should see a Copilot icon in your VSCode toolbar once installation is complete.

Step 2: Start Coding with Copilot

Now that you’ve installed Copilot, let’s see it in action.

  1. Create a New File: Open a new file in your preferred programming language (like Python or JavaScript).
  2. Write a Comment: Start by typing a comment that describes what you want to do. For example, // function to calculate factorial.
  3. Observe Suggestions: GitHub Copilot will automatically suggest code based on your comment. You can accept suggestions by pressing Tab.

Expected Output: A function that calculates the factorial of a number should appear in your code.

Step 3: Refine Your Code

While Copilot is powerful, it’s not perfect. You’ll want to refine its suggestions.

  1. Review Suggestions: After accepting a suggestion, take a moment to review the code.
  2. Modify as Needed: If something doesn’t look right, edit the code manually. Copilot learns from your corrections over time.
  3. Use Inline Comments: Add inline comments to guide Copilot for better suggestions in future lines.

Expected Output: Improved and optimized code based on your preferences.

Step 4: Explore Advanced Features

  1. Multi-line Comments: Use more detailed comments to ask for complex functions. For instance, /* function to sort an array and remove duplicates */.
  2. Testing: Write test cases and let Copilot suggest tests based on your function definitions.
  3. Code Completion: As you type, watch for inline auto-completions that can save you time.

Expected Output: A suite of well-tested functions ready for deployment.

Troubleshooting: What Could Go Wrong

  • Inaccurate Suggestions: Sometimes Copilot may suggest irrelevant code. In this case, refine your comments or try rephrasing your request.
  • Performance Issues: If VSCode slows down, check for other extensions that might conflict with Copilot.
  • Subscription Issues: Ensure your GitHub Copilot subscription is active; otherwise, suggestions will be limited.

What’s Next: Progressing from Here

Once you’ve familiarized yourself with Copilot, consider the following steps:

  • Integrate Copilot in Your Workflow: Use it for all your coding tasks to improve efficiency.
  • Explore Other AI Tools: Consider tools like Tabnine or Kite for additional AI coding support.
  • Join a Community: Participate in forums and groups to share tips and ask questions about using Copilot effectively.

Conclusion: Start Here

Using GitHub Copilot can drastically improve your coding efficiency and quality. By following this guide, you can set it up and start leveraging its capabilities in just 2 hours. Remember, the key is to engage actively with the suggestions and refine them according to your needs.

If you’re serious about leveling up your coding game, give GitHub Copilot a try. You might even find it becomes an indispensable part of your coding 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