Ai Coding Tools

How to Train GitHub Copilot to Handle Your Specific Coding Style in 30 Minutes

By BTW Team3 min read

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

In short

A step-by-step guide to customizing GitHub Copilot to match your coding preferences and improve your development workflow within half an hour.

If you’re anything like me, you’ve probably found GitHub Copilot to be a double-edged sword. It can be incredibly helpful for speeding up your coding, but it doesn’t always align with your specific coding style or preferences. The good news is, you can train it to better fit your needs. In this guide, I’m going to walk you through how to get GitHub Copilot to adapt to your coding style in just 30 minutes.

Prerequisites: What You Need Before Starting

  • GitHub Copilot Subscription: $10/month for individuals. You can also start with a free trial if you haven't used it yet.
  • A Code Editor: Visual Studio Code is recommended since it integrates seamlessly with Copilot.
  • Sample Code: Have a few files with your coding style handy for training.

Step 1: Set Up GitHub Copilot

  1. Install GitHub Copilot: If you haven’t already, install the GitHub Copilot extension in Visual Studio Code. You can find it in the Extensions Marketplace.
  2. Sign In: Log in with your GitHub account to activate your subscription.
  3. Enable Copilot: Make sure Copilot is enabled in your settings.

Expected Output: You should see the Copilot icon in the editor, indicating that it’s ready to assist.

Step 2: Create a Training Repository

  1. New Repository: Create a new GitHub repository specifically for training purposes.
  2. Add Sample Code: Upload at least 5-10 files that showcase your coding style. Include various functions, classes, and comments that reflect how you write code.

Expected Output: Your repository should have a diverse set of code files that Copilot can learn from.

Step 3: Use Your Code as Context

  1. Open Your Files: In Visual Studio Code, open the files you just uploaded to your repository.
  2. Start Coding: Begin writing code in the same style as your samples. The more you write, the better Copilot learns.
  3. Use Comments: Add comments that explain what you are trying to achieve. Copilot pays attention to comments and can adjust its suggestions accordingly.

Expected Output: As you type, you’ll notice Copilot suggesting code that aligns more closely with your style.

Step 4: Provide Feedback

  1. Accept or Reject Suggestions: As Copilot offers suggestions, either accept them or provide feedback. If a suggestion is off, reject it and continue coding.
  2. Use the Thumbs Up/Down: Use the thumbs up or down buttons on suggestions to help Copilot learn what works and what doesn’t.

Expected Output: Over time, Copilot should start to provide better suggestions that align with your coding style.

Troubleshooting: What Could Go Wrong

  • Inaccurate Suggestions: If Copilot isn't learning your style, ensure that you are consistently using your sample code as a reference.
  • Feature Limitations: Keep in mind that Copilot might still suggest generic solutions that aren't always in line with your style. It's not perfect and can misinterpret your intentions.

What’s Next: Advanced Customization

Once you feel comfortable with the basic training, consider exploring advanced techniques:

  • Fine-tune with More Data: Add more files to your training repository to cover edge cases and different scenarios.
  • Integrate with Other Tools: Consider using tools like Prettier or ESLint to enforce style rules that Copilot can learn from.

Conclusion: Start Here

To effectively train GitHub Copilot for your specific coding style, follow these steps and dedicate just 30 minutes. Start with your sample code, provide consistent feedback, and watch as Copilot begins to align more with how you like to code.

Remember, it may take a bit of time for it to fully adapt, so be patient and keep experimenting!

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