Ai Coding Tools

How to Trained GitHub Copilot to Fit Your Coding Style in under 30 Minutes

By BTW Team3 min read

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

In short

A step-by-step guide for developers on how to customize GitHub Copilot to adapt to their unique coding preferences within just half an hour.

As an indie hacker or solo founder, you're probably familiar with the frustration of having your coding style clash with AI suggestions. GitHub Copilot is a powerful tool, but it can sometimes feel like it's generating code that doesn't align with your preferences or project structure. The good news? You can customize it to better fit your coding style in under 30 minutes. Let’s dive into how to do just that.

Time Estimate: 30 Minutes

You can complete this customization process in about 30 minutes, assuming you have a basic understanding of GitHub and coding conventions.

Prerequisites

  • A GitHub account
  • Visual Studio Code (VSCode) installed
  • GitHub Copilot extension installed and activated
  • A sample project or codebase to work with

Step-by-Step Guide to Train GitHub Copilot

Step 1: Set Up Your Environment

  1. Open VSCode: Start by launching Visual Studio Code.
  2. Open Your Project: Load the project where you want to use GitHub Copilot.

Step 2: Write Sample Code

  1. Create a New File: Create a new file in your project.
  2. Write Examples: Write a few functions or code snippets that reflect your coding style. For example:
    function calculateSum(a, b) {
        return a + b;
    }
    

Step 3: Use GitHub Copilot

  1. Trigger Suggestions: Start typing a function name or comment, and GitHub Copilot will suggest code. Accept suggestions that align with your style.
  2. Feedback Loop: If the suggestion doesn't fit, modify it to reflect your style. GitHub Copilot learns from your edits, so the more you interact, the better it gets.

Step 4: Fine-Tune Your Suggestions

  1. Utilize Comments: Write comments that describe what you want to achieve. For example:
    // Function to calculate the average of an array
    
    This helps Copilot understand your intent better.

Step 5: Review and Iterate

  1. Test Suggestions: Run the code generated by Copilot to see if it works as expected.
  2. Refine Your Input: If the code needs adjustments, continue tweaking your examples and comments. This iterative process is crucial for fine-tuning.

Step 6: Explore Configuration Options

  1. Check Settings: Go to the GitHub Copilot settings in VSCode and explore configuration options. Adjust settings like suggestion frequency and inline completion preferences based on your workflow.

Troubleshooting Common Issues

  • Suggestions Not Relevant: If suggestions are consistently off, revisit your example code. Ensure that it reflects your style and conventions.
  • Performance Lag: If Copilot is slow, check your internet connection or restart VSCode to refresh the extension.

What's Next?

Once you've trained GitHub Copilot to better fit your coding style, consider exploring its advanced features. You can integrate it with other tools like GitHub Actions for CI/CD, which can save even more time on repetitive tasks.

Conclusion: Start Here

If you're looking to make GitHub Copilot work for you rather than against you, follow these steps to customize it in under 30 minutes. The key is to provide clear examples and feedback, allowing Copilot to learn your preferences effectively.

What We Actually Use

In our experience, we primarily use GitHub Copilot for writing boilerplate code and generating utility functions. It has significantly sped up our development process, especially for repetitive tasks. However, we still find it essential to review and refine the suggestions to maintain code quality.

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