Ai Coding Tools

How to Use GitHub Copilot to Code Your First Project in 2 Hours

By BTW Team3 min read

How to Use GitHub Copilot to Code Your First Project in 2 Hours

If you're just starting out with coding, you've probably faced the daunting task of figuring out how to make your first project come to life. It's overwhelming, right? You want to build something, but where do you even start? Enter GitHub Copilot, an AI-powered coding assistant that can help you write code faster and with less frustration. In this guide, I’ll walk you through how to use GitHub Copilot to kickstart your first project in just 2 hours.

Prerequisites: What You Need

Before diving in, make sure you have the following:

  • A GitHub account: Sign up for free at github.com.
  • Visual Studio Code: Download and install it from code.visualstudio.com.
  • GitHub Copilot subscription: The pricing is $10/month or $100/year, which is a solid investment for solo builders.
  • Basic understanding of programming concepts: You don’t need to be a pro, but familiarity with variables, functions, and control structures is helpful.

Step-by-Step: Getting Started with GitHub Copilot

1. Install GitHub Copilot

  • Open Visual Studio Code.
  • Go to Extensions (the square icon on the sidebar).
  • Search for "GitHub Copilot" and click "Install."
  • Sign in with your GitHub account and activate your subscription.

2. Start a New Project

  • Create a new directory for your project in your terminal or file explorer.
  • Open this directory in Visual Studio Code.
  • Create a new file (e.g., app.js for a JavaScript project).

3. Write Your First Function

Type out a comment describing the function you want to create. For instance:

// Function to add two numbers

As you type, GitHub Copilot will suggest code completions. Press Tab to accept a suggestion. You'll see something like this:

function add(a, b) {
    return a + b;
}

4. Test Your Function

Add some test cases to ensure your function works as expected:

console.log(add(2, 3)); // Should print 5
console.log(add(-1, 1)); // Should print 0

Run the code in your terminal to see the output.

5. Expand Your Project

Now that you have a basic function working, think about additional features you want to add. For example, if you’re building a calculator, you might want to add subtraction, multiplication, and division functions.

6. Use Copilot for More Complex Functions

For more complex functions, provide comments that outline what you want to achieve. For example:

// Function to multiply two numbers

Copilot will likely generate a function for you that you can modify as needed.

7. Save and Commit Your Code

Once you’re satisfied with your project, save your work and commit your changes to GitHub:

git init
git add .
git commit -m "Initial commit"
git remote add origin <your-repo-url>
git push -u origin master

Troubleshooting: What Could Go Wrong

  • Copilot doesn’t suggest anything: Ensure you’re typing in a code file and not a text or markdown file.
  • Suggestions don’t make sense: Sometimes Copilot may misunderstand your comment. Be specific with your prompts.

What's Next: Building Upon Your Project

Now that you’ve built your first project, consider expanding it by:

  • Adding a user interface using HTML/CSS.
  • Implementing more complex logic with additional JavaScript libraries.
  • Exploring deployment options on platforms like Vercel or Netlify.

Conclusion: Start Here

Using GitHub Copilot can significantly reduce the time it takes to write your first project. In just 2 hours, you can go from zero to a working application. If you’re looking to build something quickly and learn along the way, GitHub Copilot is a solid choice.

Final Recommendation: Start by writing simple functions and build from there. Use Copilot to speed up your learning process, but don’t forget to understand the code it generates.

Follow Our Building Journey

Weekly podcast episodes on tools we're testing, products we're shipping, and lessons from building in public.

Subscribe

Never miss an episode

Subscribe to Built This Week for weekly insights on AI tools, product building, and startup lessons from Ryz Labs.

Subscribe
Ai Coding Tools

Codeium vs GitHub Copilot: A 2026 Feature Comparison for Developers

Codeium vs GitHub Copilot: A 2026 Feature Comparison for Developers As developers, we’re always on the lookout for tools that can enhance our productivity and streamline our coding

Jul 26, 20263 min read
Ai Coding Tools

5 Ways to Supercharge Your Coding Workflow with AI Tools

5 Ways to Supercharge Your Coding Workflow with AI Tools As builders, we’re constantly looking for ways to optimize our coding workflows. In 2026, the landscape for AI tools has ex

Jul 26, 20265 min read
Ai Coding Tools

10 AI Coding Tools Every Solo Developer Needs in 2026

10 AI Coding Tools Every Solo Developer Needs in 2026 As a solo developer, juggling multiple hats can be overwhelming. Between writing code, debugging issues, and managing project

Jul 26, 20265 min read
Ai Coding Tools

How to Integrate GitHub Copilot into Your Workflow in 7 Steps

How to Integrate GitHub Copilot into Your Workflow in 7 Steps If you're like me, you’ve probably experienced the frustration of staring at a blank screen, waiting for inspiration t

Jul 26, 20263 min read
Ai Coding Tools

Why Some Developers Think AI Coding Tools Are Overrated (And Why They're Wrong)

Why Some Developers Think AI Coding Tools Are Overrated (And Why They're Wrong) In 2026, the conversation around AI coding tools has reached a fever pitch. While many developers sw

Jul 26, 20264 min read
Ai Coding Tools

Cursor vs Codeium: An In-Depth Comparison for Agile Developers

Cursor vs Codeium: An InDepth Comparison for Agile Developers As agile developers, we know the constant push for efficiency, speed, and quality in our coding workflows. With the ri

Jul 26, 20263 min read