DXHEROES Logo
What We Do

/

Back to insights

#ai, #guide

How to get started with GitHub Copilot?

Length: 

12 min

Published: 

October 16, 2025

GitHub Copilot can speed up development by up to 50% in many teams.

You may have heard of it, but haven't tried it yet. In this article, we'll go over the setup and the first steps to get started.

But Copilot is certainly not just for developers; it can also help analysts, testers, or non-IT people with simple scripts and prototypes - often without prior programming experience.

But it's still an assistant, not an autopilot. Start small and gradually discover what it can do in your context.

What is it and what to expect from it?

GitHub Copilot is an AI assistant for programming. It significantly speeds up writing code. It is powered by advanced artificial intelligence models, primarily from OpenAI and Anthropic.

How does it work? Copilot reads the context of your project: text, code already written, file names and comments, and suggests what to do next: additional lines, entire functions and tests. You control it in a common language, like "create a function to add two numbers". The suggestion appears straight away in the editor.

What can it do?

  • Code completion: It predicts and offers a continuation of the code you write.
  • Generation from comments: Creates code based on a textual description.
  • Explaining the code: It can help you understand complex or unfamiliar sections of code.
  • Refactoring: Suggests improvements for code structure and readability.
  • Creating tests: It generates unit and integration tests for your code.
  • Copilot panel (central interface): the place where you interact with Copilot and choose the mode of work - chat (only suggests), editor (changes the current file) or agent (can interfere across the project).
    • Copilot Chat: interactive window for AI conversation. Used for troubleshooting or code queries. It does not make automatic changes directly to the code.
    • Copilot Edit (Inline editor): makes edits only to the currently open file. Less autonomous than an agent; typically suggests a solution (diff) and you confirm the change.
    • Copilot Agent: can handle complex tasks across files (e.g. fix all errors in a file), including the use of tools such as commands.

Tip: Start in Chat to understand the problem, use Edit for quick local changes, and then use Agent for broader interventions across the repository.

You can expect Copilot to speed up your work. It will significantly reduce the time spent on routine code writing. It also helps with learning: it shows new patterns and different ways of solving. Often, it will even supply a solid initial design, which you can then modify to suit yourself.

At the same time, it is not a replacement for the developer; human logic and critical thinking remain key. The generated code is not flawless, so it must be checked, tested and watched for any bugs, security holes or inefficient implementation. Even if Copilot has access to the project, without sufficient context (rules, documentation, comments) it behaves like a developer in someone else's code: it figures out part of the intent and the results may be at odds with what you want - even more so the more changes it generates.

Installation and first steps

To start using GitHub Copilot, you first need to install the extension in your favorite development environment.

Supported IDE:

  • Visual Studio Code: The most common choice, easy to install via the Marketplace.
  • Visual Studio: Full support for development in .NET and other technologies.
  • JetBrains IDEs: Integrated environment for PyCharm, IntelliJ IDEA, WebStorm and others.
  • Azure Data Studio: Support for working with databases.

How to activate Copilot:

  • Step 1: Installing an extension: open the extension manager in your IDE and search for "GitHub Copilot". Install it.
  • Step 2: Login: After installation, you will be prompted to log in with your GitHub account. Confirm authorization in your web browser.
  • Step 3: Subscription activation: Make sure you have an active GitHub Copilot subscription. There are trial, paid plans for individuals (Pro) and for businesses (Enterprise).

Example: installation in VS Code

  1. Open VS Code -> Extensions (Ctrl+Shift+X)
  2. Search for "GitHub Copilot"
  3. Click on "Install"
  4. After installation, the Copilot icon will appear in the bottom right corner, if not, restart the IDE.

Tip: After installation and login, make sure the Copilot icon is active in the status bar of your IDE (probably on the bottom right). Try typing in a new JavaScript file function helloWorld() { and watch for Copilot to offer completion. If it does, you're ready to start coding with AI!

Basic work with Copilot

After successful installation and activation, it's time to learn the main ways to use GitHub Copilot. There are primarily two ways to interact: code suggestions and Copilot Chat.

Code suggestions:

  • "Ghost text": Code drafts are displayed directly in your editor as transparent text.
  • Confirmation: Press the key Tab for the adoption of the entire proposal.
  • Rejection: Press the key Esc to cancel the current proposal.
  • Cycling of proposals: If Copilot offers more than one option, you can switch between them using Alt/Option + ] and Alt/Option + [.
  • Example: Start typing a function and Copilot will prompt you to finish.
def factorial(n):
    # Copilot offers: if n == 0: return 1
    # Copilot offers: else: return n * factorial(n-1)

Copilot Instructions (system prompt)

To make Copilot advise in your style and with respect to your project, add copilot-instructions.md to the repository. Copilot will take it into context during chat and inline generation.

What to put in it:

  • How we think about code: architecture, domain concepts, preferred patterns/anti-patterns.
  • Code style & conventions: nomenclature, module structure, comments on new features, test requirements.
  • Tech stack: language, frameworks, libraries, internal utilities.
  • Quality & safety: required controls, lint/format, safety policies.
  • How we assign tasks to Copilot: short examples of good prompts (what to do/not to do).
# Copilot Instructions
## Style & Conventions
- Use … naming
- Every new function: docstring + example
## Tech Stack
- Language/Framework: …
## Quality
- Tests: unit + coverage ≥ …
## Prompts
- When asked to refactor, keep public API stable and add tests.

Copilot Chat

  • Inline query: Use Ctrl/Cmd + I to open the chat window directly in the editor for the selected code. Ideal for quick questions on a specific section.
  • Separate panel: Open Ctrl/Cmd + Shift + I for the full chat panel. Here you can ask more general questions, generate new files or solve more complex problems.
  • Slash commands: Use special commands in chat for specific actions:
    • /explain: Explains the selected code.
    • /tests: generates unit tests for the selected code.
    • /fix: Suggests fixes for errors in the selected code.
    • /refactor: helps with code refactoring.
    • /new: Creates a new code file based on the description.
  • Example: In the chat, type /explain selected code after the function label.
  • Example: In the chat, type /tests for this function after the function label.

Tip: Start with inline designs, they are intuitive and the fastest. When you run into a more complex problem or need an explanation, switch to Copilot Chat. Experiment with slash commands, they will greatly streamline your work, thanks to Copilot's quicker explanation of what we want without too much sauce around.

Code generation and completion

GitHub Copilot offers two main ways to help you with your code: code completions and Copilot Chat. Each is suitable for different situations.

Code Completions

This is the primary way Copilot works. It offers suggestions directly while writing code.

  • How it works: Copilot analyzes the code you write and provides immediate suggestions. These are displayed as gray text, which you can accept by pressing the Tab key.
  • Limited context: Copilot uses a limited context for code completions. That is, it focuses on the code in the current file and several surrounding files.
  • When to use: Ideal for smaller tasks, completing lines, generating boilerplate code, or writing simple functions.

Example (boilerplate):

# Create a basic Flask application
from flask import Flask
app = Flask(__name__)

@app.route('/')
def hello_world():
    return 'Hello, World!'

Example (finishing):

function fetchData(url) {
    // After typing "return fetch(url).t" Copilot suggests "hen(res => res.json());"
    return fetch(url).then(res => res.json());
}

Copilot Chat

Copilot Chat is an interactive interface. It allows you to have a dialogue with Copilot. It is suitable for more complex tasks.

  • How it works: You can ask questions in natural language. Copilot responds with code, explanations or suggestions. It has access to the broader context.
  • Greater context: Copilot Chat can use a context of up to 128k tokens. This allows it to "see" more files in your project. This gives you a better understanding of more complex problems.
  • When to use:
    • Complex tasks: generating entire components or refactoring larger blocks of code.
    • Analysis: explanation of the code, finding bugs or suggestions for improvement.

Survey: Getting information about libraries or APIs.

User: "Write me a function in Python that loads data from a JSON file and returns it as a dictionary. Add error handling."
Copilot:
import json
def load_json_data(filepath):
    try:
        with open(filepath, 'r', encoding='utf-8') as f:
            data = json.load(f)
        return data
    except FileNotFoundError:
        print(f"Error: File '{filepath}' was not found.")
    except json.JSONDecodeError:
        print(f"Error: File '{filepath}' is not a valid JSON format.")
    except Exception as e:
        print(f"An unexpected error occurred while reading file '{filepath}': {e}")
    return None

Best Practices

Maximize the effectiveness of Copilot by following these tips:

  • Write idiomatically: Try to write code as an experienced programmer would write it in the language. Copilot is trained on millions of lines of code. It responds better to common patterns and conventions.
    • Why: When you write according to standard practices, Copilot better anticipates what you want and generates more relevant proposals.
  • Keep files open: The more relevant files you have open in your IDE, the more context Copilot has. This helps it generate more accurate and contextually relevant code.
    • Why: Copilot "reads" open files. It understands dependencies, data structures and existing logic.
  • Context = quality: The quality of the generated code is directly related to the context you provide to Copilot.
    • Explanation: the more relevant code, comments and open files Copilot sees, the better it understands your intentions. This leads to more accurate, relevant and usable designs.

Summary

After a quick installation and activation, GitHub Copilot will help you significantly speed up your IDE routine. It can add code, generate functions from comments, explain extraneous parts of code, suggest refactoring, and create tests. Through Copilot Chat, you can easily solve specific tasks and broader issues with it. But it's still about the assistant: you need to check and test the designs and give it the best context to get a good result.

Now you have everything you need to start using GitHub Copilot. We're planning a follow-up to this series where we'll go more in-depth: refactoring and optimizing, test generation, and finally, how to achieve higher quality code when using Copilot on a team.

Back to insights

Want to stay one step ahead?

Don't miss our best insights. No spam, just practical analyses, invitations to exclusive events, and podcast summaries delivered straight to your inbox.