Find helpful tutorials or share inspiring use cases on AI technology for higher education.

Shared content may not reflect the policies of Tilburg University on the use of AI. 

Meet GitHub Copilot: Your Personal AI Coding Assistant

Welcome to the future of coding! If you’ve ever wished for a coding buddy who’s always there to help, whether for a research project or your thesis, GitHub CoPilot might be your new best friend. Let’s dive in and explore this revolutionary tool.

What is GitHub Copilot?

At its core, GitHub CoPilot is an AI-driven pair programmer. For those unfamiliar with the term “pair programming,” It’s a technique where two programmers work together at one computer, one writing the code and the other reviewing each line as it’s written. Imagine having an AI as your coding partner, always ready to assist and guide you.

With CoPilot, you can write code faster and with significantly less effort. As you type or even before you start typing, it provides suggestions. These aren’t just random suggestions; CoPilot draws context from the comments you write and the code you’ve already typed. Whether a single line of code or an entire function, CoPilot instantly offers its insights.

It has been trained on a combination of natural language text and source code. And the source of this code? Public repositories on GitHub. This means CoPilot has been exposed to various coding scenarios, styles, and solutions, making its suggestions robust and often spot-on.

Can GitHub Copilot code on its own?

Does this mean that GitHub Copilot creates code by itself, like ChatGPT? Yes and no. As explained above the terms AI pair programming and CoPilot, this tool cannot work independently. GitHub Copilot uses your existing code and the context from the comments you write to instantly suggest code. With GitHub Copilot, you can convert comments to code, autofill repetitive code, and see alternative suggestions.

GitHub Copilot Features

Github Copilot features include:

  • Code autocompletion: generating suggestions while typing the code.
  • Code generation: Copilot will use the context of the active document to generate suggestions for code that might be useful.
  • Answering questions: it can also be used to ask simple questions while you are coding (e.g., “What is the definition of mean?”).
  • Language support: supports multiple programming languages, including R, Python, SQL, HTML, and JavaScript.
  • Copilot Chat: A chat interface that lets you ask coding-related questions.
    • GitHub Copilot Chat is available on GitHub.com (Copilot Enterprise only), in GitHub Mobile, and in supported IDEs (Visual Studio Code).

Set up GitHub and Copilot

  1. First, configure your GitHub account. To use Copilot you need an active GitHub account. A useful source is Set up Git and GitHub.
  2. Click your profile photo in the upper-right corner and click on Settings.
  3. In the “code, planning and automation”, click GitHub Copilot.
  4. Click Enable GitHub Copilot.
  5. Select monthly or yearly billing, then click Continue.
  6. If eligible, you’ll be directed to step 7 Otherwise, confirm payment details and click Submit.
  7. Set your preferences, click Save, and get started.

Installing GitHub Copilot Extension for Visual Studio Code

  1. Visit the GitHub Copilot extension page in the Visual Studio Code Marketplace.
  2. Click Install.
  3. A popup will prompt you to open Visual Studio Code. Click Open Visual Studio Code.
  4. In the “Extension: GitHub Copilot” tab, click Install.
  5. If prompted, sign in to GitHub in Visual Studio Code.
  6. In your browser, approve the permissions for GitHub Copilot by clicking Authorize Visual Studio Code.
  7. Back in Visual Studio Code, click Open to confirm authentication.

Billing options

Flexible Options for Everyone:

  • Monthly: Enjoy CoPilot’s features for just $10 each month.
  • Yearly: Option for an annual subscription at $100, effectively giving you two months free. Switch between plans anytime, with changes applying from your next billing cycle.

🎉Special Free Access🎉:

  • For Students & Teachers: Verified educators and those with the GitHub Student Developer Pack can access CoPilot for free.
  • Open-Source Maintainers: If you’re at the helm of a popular open-source repository on GitHub, you might be eligible for complimentary access. Check the CoPilot subscription page for notifications.

For more on the GitHub Student Developer Pack, see “Apply to GitHub Global Campus as a student.”

How can you get GitHub Copilot for free as a student? This article will show you how.