Brifing

Write Your First Prompt with GitHub Copilot

Discover easy ways to start working with the AI assistant.

The GitHub Blog2 min

1Perfect Prompts Aren't Required to Start

You don't need to craft the perfect prompt to begin using GitHub Copilot. Simply describe the change you want to make in plain English. For example, 'Add a most-funded sort option to the games list' is enough to get started. The AI will examine your project, locate relevant code sections, and implement the change. Even if the first attempt isn't perfect, you can iteratively refine it by providing additional details until you get the desired result.

2Provide the Right Context

Copilot needs access to a codebase to function effectively. From the GitHub Copilot app, you can select a project you've worked on before or add a local folder from your machine. Whether it's a GitHub repository or a local directory, connecting a project gives the AI the necessary context to understand your code and make changes. This step is crucial for Copilot to successfully complete your requested tasks.

3Model Selection Offers Flexibility

The GitHub Copilot app allows you to choose between different AI models. Some models are better suited for complex reasoning, while others handle simpler tasks more efficiently. You can start with the default model and switch as needed when tasks require different capabilities. The model selector isn't a pre-session configuration but rather a tool you can use adaptively based on your current task's requirements.

4Voice Input for Convenience

Typing isn't your only input option. GitHub Copilot features built-in voice input, which is particularly useful when thinking through problems aloud or describing longer requests. Your speech converts to text in the prompt box, where you can review and edit before submission. This feature provides an alternative way to articulate your ideas when typing might not be the most natural or efficient method for you.

5Session Customization Options

GitHub Copilot offers various ways to customize your sessions. You can select different agents for different types of work or enable remote control for your session. Remote sessions provide additional flexibility by allowing you to access your work from any device via the web. You can start a task on your laptop, close it, and later resume from another device without losing progress, making distributed work more seamless.

6Start Small and Simple

When beginning with GitHub Copilot, it's best to start with small, simple changes in a familiar project. This approach lets you observe how the AI works and understand its capabilities. As you gain experience, you can refine your requests, experiment with different models, or adjust session settings. The more you use the app, the more intuitive these choices will become in your workflow.

7The Power of Iterative Refinement

Prompt writing is an iterative process. Even if your initial attempt doesn't yield perfect results, you can improve the AI's output by providing additional details and corrections. GitHub Copilot incorporates new information to produce better results with each iteration. This approach saves significant time, especially for complex code changes, and helps developers work more efficiently with AI assistance.

8Get Started Today

Don't wait for the perfect moment to start with GitHub Copilot. Choose a project, give Copilot a simple task, and discover what it can do. As you use the AI assistant more, you'll learn how to work with it more effectively. The important thing is to take that first step and gain experience. GitHub Copilot is designed to accelerate and simplify your software development process through powerful AI assistance.

Original article: The GitHub Blog — GitHub Copilot ile İlk Prompt'unuzu Yazın