
The GitHub Copilot Handbook
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
- Explore GitHub Copilot's advanced features like PR reviews, error insights, and Copilot Chat
- Scale Copilot across dev, QA, and PM roles with guided onboarding and practical usage patterns
Book DescriptionCross-functional product teams are under constant pressure to build and ship faster, but too much time is lost to manual coding, slow reviews, and fragmented workflows. GitHub Copilot streamlines day-to-day coding so your team can focus on delivering value to users while maintaining high quality on real projects. Written by industry experts Rob Bos and Randy Pagels, this book shows how GitHub Copilot supports your work from start to finish. You'll learn how to turn ideas into tasks, write code with fewer hiccups, spot problems earlier, and understand errors when things go wrong. You'll also see how Copilot suggests improvements in pull requests and helps fix common build issues, enabling teams to keep moving and ship with confidence. You'll integrate GitHub Copilot into daily routines, share it across roles, and make it stick with simple checklists and clear examples. You'll also track what works, set guardrails, and build an internal community. By the end, you'll know when GitHub Copilot helps - and when it doesn't - and you'll be ready to write, review, and ship code with confidence on real projects. *Email sign-up and proof of purchase required What you will learn - Apply GitHub Copilot across the full software development life cycle
- Understand how AI powers the suggestions and chat features
- Boost productivity by automating tests, reviews, and pipeline fixes
- Integrate Copilot into IDEs and GitHub for maximum value
- Roll out Copilot across teams with proven onboarding strategies
- Build a knowledge-sharing culture with Copilot community champions
Who this book is forThis book is for anyone who works with application creation and who wants to harness GitHub Copilot in real-world coding environments. Whether you're a beginner looking to speed up learning or a seasoned engineer aiming to boost productivity, this guide shows how to put Copilot to work effectively. Software engineers, DevOps professionals, QA specialists, and tech leads will discover how to streamline coding, reviews, and delivery with AI-assisted workflows. Product managers and other collaborators will also gain insight into how, with GitHub Copilot, they themselves can leverage AI.
All prices
More details
Content
- Cover
- Title Page
- Copyright and Credits
- Foreword
- Contributors
- Table of Contents
- Preface
- Free Benefits with Your Book
- Part 1: What is GitHub Copilot?
- Chapter 1: GitHub Copilot Explained
- Free Benefits with Your Book
- Technical requirements
- What is GitHub Copilot?
- Reviewing additional supporting features in editors
- Editors with GitHub Copilot plugins
- Additional integrations outside of editors
- Editor feature release schedules
- Using GitHub Copilot integrations on GitHub.com
- Summary
- Get This Book's PDF Version and Exclusive Extras
- Chapter 2: Getting Started with Generative AI
- Understanding generative AI
- Language models and sizes
- Using LLMs for text prediction
- System prompts
- Context sizes matter
- Utilization of generative AI
- General uses of AI
- Uses for structured versus unstructured information
- Uses of AI in coding
- Limitations of generative AI
- Bias
- Context size
- Perceived reasoning versus non-deterministic results
- Model memory
- Summary
- Get This Book's PDF Version and Exclusive Extras
- Chapter 3: Choosing the Right GitHub Copilot Plan
- Overview of GitHub Copilot plans
- Free plan
- Pro plan
- Pro+ plan
- Business plan
- Enterprise plan
- Comparing GitHub Copilot plan features
- Core features
- Feature matrix
- What's new or in preview?
- Best practices: picking features that matter
- Common pitfalls
- Reviewing intended users and common use cases
- Free plan
- Pro plan
- Pro+ plan
- Business plan
- Enterprise plan
- Use case comparison
- Understanding GitHub Copilot limitations and restrictions
- Usage caps and quotas
- Free plan
- Pro and Pro+ plans
- Business and Enterprise plans
- Feature availability and plan-specific restrictions
- Platform and environment constraints
- Seat, billing, and compliance limits
- Common pitfalls
- Pricing structure and billing considerations
- How GitHub Copilot plans are priced
- Premium requests: what they are and why they matter
- Billing models and considerations
- Avoiding billing surprises
- Choosing the right plan
- Start with your primary goals
- Decision flowchart: which plan fits your needs?
- Best practices for choosing
- Staying up to date with recent and upcoming changes
- Where to find the latest information
- Staying prepared for upcoming features
- Common pitfalls
- Upgrading, downgrading, and change management
- Upgrading your GitHub plan
- Downgrading or canceling your plan
- Migrating between individual and organizational plans
- Change management best practices
- Common pitfalls
- Usage dashboards and monitoring
- Consumption Metrics dashboard
- Premium Requests Usage Analyzer
- Updates site by Xebia
- Best practices for dashboard use
- Common pitfalls
- Summary
- Frequently asked questions
- Get This Book's PDF Version and Exclusive Extras
- Part 2: Getting Started with GitHub Copilot
- Chapter 4: Mastering GitHub Copilot in Your IDE: Inline Suggestions, Chat, and Agent Mode
- Technical requirements
- A copilot, not an autopilot
- Code completions: the core experience
- Accepting, cycling, and rejecting suggestions
- Best practices for completions
- Common pitfalls to avoid
- Comments to code: turning natural language into working code
- Writing natural language prompts
- Common pitfalls to avoid
- Inline suggestions and context awareness: real-time predictions as you type
- How inline suggestions differ from comments to code
- Best practices
- Common pitfalls to avoid
- GitHub Copilot Ask Mode: conversational assistance in the IDE
- How Copilot gathers context
- Using GitHub Copilot Ask Mode
- Getting the most out of GitHub Copilot Ask Mode
- Using slash commands and @participants
- Adding context with #keywords
- Common pitfalls to avoid
- GitHub Copilot Edit Mode: instantly refactoring and improving code
- Scenarios for edits
- Using GitHub Copilot Edit Mode
- Best practices
- Common pitfalls to avoid
- GitHub Copilot Agent Mode: automating multi-step tasks
- What is Agent Mode?
- When and how to use Agent Mode
- Reviewing and accepting changes in Agent Mode
- Best practices
- Common pitfalls to avoid
- Combining features for real workflows
- Workflow example 1: from comment to complete solution (JavaScript)
- Workflow example 2: infrastructure and CI/CD (Terraform, YAML, PowerShell)
- Best practices for combining Copilot features
- Common pitfalls to avoid
- GitHub Copilot in different IDEs: what's the same, what's unique
- Differences and unique features
- Best practices
- Common pitfalls to avoid
- Summary
- Get This Book's PDF Version and Exclusive Extras
- Chapter 5: Going Beyond Code: Debugging, Terminal, and Collaboration with GitHub Copilot
- Terminal and Command Palette integration
- Using the terminal
- Using the Command Palette
- Best practices
- Common pitfalls to avoid
- GitHub Copilot CLI features
- What is GitHub Copilot CLI?
- Setting up the GitHub Copilot CLI extension
- Real-world examples of Copilot CLI in action
- Example 1: Automating CSV backup and cleanup
- Example 2: Explaining a Git command
- Example 3: Interacting with GitHub.com
- Integrating Copilot CLI with automation
- Best practices
- Common pitfalls to avoid
- Debugging support
- What can GitHub Copilot do in the debugger?
- Example 1: JavaScript stack trace analysis
- Example 2: SQL error assistance
- Supported languages and scenarios
- Best practices
- Common pitfalls to avoid
- Other IDE-integrated tools
- Manual pull request summaries and local code review
- Manual local review
- Integrated review with the GitHub Pull Requests extension
- Best practices
- Common pitfalls to avoid
- Test runners and code analysis
- Example 1: Generating a test case
- Example 2: Summarizing analysis results
- Best practices
- Common pitfalls to avoid
- Extension points
- Real-world workflow scenarios
- Scenario 1: From bug discovery to fix and review
- Scenario 2: Infrastructure automation and CI/CD improvements
- Scenario 3: Reviewing and documenting a feature branch
- Scenario 4: End-to-end testing workflow
- Best practices for workflow integration
- Common pitfalls to avoid
- Quick reference checklist
- Get This Book's PDF Version and Exclusive Extras
- Summary
- Part 3: Exploring GitHub Copilot Integrations
- Chapter 6: Collaborating with Copilot on GitHub.com: Issues, PRs, Reviews, and Coding Agent
- GitHub Copilot Chat on GitHub.com
- Reviewing a SQL migration in a PR
- Explaining a CI failure in GitHub Actions
- Onboarding and documentation
- Issue and discussion support
- Drafting and summarizing issues
- Automating responses and routine tasks
- Supporting discussions
- Workflow example
- PR support
- Summarizing PRs
- Assigning GitHub Copilot as a reviewer
- General example
- Workflow example
- Reviewing and commenting on code
- Autofix
- PR suggestions
- GitHub Copilot Autofix in GitHub Advanced Security
- Coding Agent on GitHub.com
- Coding Agent versus Agent Mode
- How the Coding Agent works on GitHub.com
- Viewing the Coding Agent session
- Where it fits best
- How it fits into your workflow
- Additional configuration options for the Coding Agent
- Additional GitHub.com Copilot features
- Bulk summaries and comments
- Context-aware suggestions in code and documentation
- Metrics and activity dashboards
- Copilot IDE usage
- Premium request analytics
- Detailed Copilot usage patterns
- Early access and experimental features
- Integration with team workflows
- Smart integrations
- Summary
- Get This Book's PDF Version and Exclusive Extras
- Chapter 7: Extending GitHub Copilot with the Model Context Protocol (MCP)
- What is the Model Context Protocol (MCP)?
- What MCP provides
- Installing the GitHub MCP server in VS Code
- Installation
- Authentication
- Usage
- Guarding against security risks
- MCP: local versus remote servers
- Local servers, quick and close to your code
- Remote servers, shared and consistent
- Controlling access for organizations
- End-to-end example using MCP servers
- Using MCP for the GitHub Copilot Coding Agent
- Configuring the MCP server on GitHub.com
- How the Coding Agent uses MCP (with Jira example)
- Example usage from the Coding Agent
- Summary
- Get This Book's PDF Version and Exclusive Extras
- Part 4: Getting the Most Out of GitHub Copilot
- Chapter 8: Navigating the GitHub Copilot Learning Curve
- Unpacking important learning motions
- Explain what you want to achieve
- Know your context
- Copy method calls as comments
- Top-down programming instead of bottom-up
- Typos in your prompt do not matter
- Use the chat
- Accept the truth
- Be smart and creative
- Review and refine, don't just accept
- Build team etiquette for Copilot
- Talk to it like a person (but know it doesn't care)
- Reset the conversation when things go sideways
- Mix prompting styles, models, and chat modes
- Learn from what it gets wrong
- Approaching problems the right way
- Summary
- Get This Book's PDF Version and Exclusive Extras
- Chapter 9: Building an Internal GitHub Copilot Community
- Acknowledge the learning curve
- Learning through training
- Learning from using the tools
- Internal wikis
- Weekly Q&A sessions
- Newsletters
- Hackathons
- Always open with a GitHub Copilot feature
- Mix and mingle
- Report out/giveaway prizes
- Surveys
- Metrics
- Summary
- Get This Book's PDF Version and Exclusive Extras
- Chapter 10: Changing the Narrative: Reframing Engineering with AI
- Ethical use of GitHub Copilot
- Building a sturdy DevOps foundation
- Expanding AI to engineer-adjacent roles
- AI-enhanced engineering
- Summary
- Get This Book's PDF Version and Exclusive Extras
- Chapter 11: Unlock Your Exclusive Benefits
- Unlock this Book's Free Benefits in 3 Easy Steps
- Other Books You May Enjoy
- Index
1
GitHub Copilot Explained
GitHub Copilot is a service offering from GitHub that helps you to work on your applications in all steps of the software development lifecycle: from ideation, to understanding and writing code, to reviewing your pull requests and analyzing pipeline failures. By using what we call generative Artificial Intelligence (AI), it helps you speed up normal tasks so you can focus on what you do best: adding value to your end users.
GitHub describes Copilot as your pair-programming buddy: a tool that knows almost every coding language, framework, and well-known coding patterns. It can help you with researching both existing and new code directions, can help review your code and suggest improvements, or can complete the task that you have been working on. It intuitively understands your current code and coding style and will follow that to match it. We even think that GitHub Copilot is better than a human pair-programming buddy, as it is a tool that does not judge you on anything you ask about! Can't remember how to implement an algorithm that you learned years ago? You might be afraid to ask your team members about it, but GitHub Copilot will happily explain it to you - plus, it will explain it in the context of your code base!
Keep in mind that the name of the tool also gives away the most important part of its role in your usage of it: it is a co-pilot, which means you are the pilot, and you are in control. You define the questions you ask it; the scenarios you let it complete; the help you ask it for; and whether you accept the suggestions or not. In the end, the code is stored in a Source Code Management (SCM) system with your name attached to it, not GitHub Copilot's name.
This book will take you through the impact that GitHub Copilot has on all steps of the Software Development Life Cycle (SDLC), from start to finish. We will explain the features of the tools, the basics of generative AI, and how to leverage GitHub Copilot to get the most value out of it. We will also discuss the different license types that are available and what features they have for either usage in your editor or on the web interface for GitHub.
To get things going, we will take a look at what GitHub Copilot is and what kind of features it provides. It all started as an extension in your coding editor, and it has grown into a full set of features to help you, from writing code to generating completely new ideas, from analyzing pull requests to helping you fix your pipeline errors, and so much more. These features are built into a lot of editors, and some reside inside the web interface on GitHub.com.
In this chapter, we will cover the following topics:
- What is GitHub Copilot?
- Reviewing additional supporting features in editors
- Using GitHub Copilot integrations on GitHub.com
Free Benefits with Your Book
Your purchase includes a free PDF copy of this book along with other exclusive benefits. Check the Free Benefits with Your Book section in the Preface to unlock them instantly and maximize your learning experience.
Technical requirements
To use GitHub Copilot, you do not need to use the rest of the GitHub suite of tools. You can use it in a supported editor of your choosing against any file, no matter where it is stored. If you already use source control systems such as GitLab, Azure DevOps, or Bitbucket, you can still use GitHub Copilot. GitHub is the vendor of the product, but using GitHub itself is not a requirement.
Of course, there is extra functionality available if you use GitHub, which will be explained in depth in Chapter 6. The only integration to be able to use GitHub Copilot is having a GitHub account that you can use to log in and then tie your GitHub Copilot license to it. This tool is even available as a free tier (with some limitations), making it available for all GitHub users. Which features are available in which tier is explained in Chapter 3.
What is GitHub Copilot?
GitHub Copilot is a set of tools that can help you understand or produce code, either by helping you write code in an editor, talking to your code base to gain more information, or getting help from integrated functionality inside the web interface of GitHub.
This all starts with GitHub Copilot leveraging Large Language Models (LLMs) to complete the current line(s) of code that you are working on, by adding a suggestion when you stop typing for a couple of milliseconds, or when you hit the Return key. Depending on your color scheme, a suggestion is shown in gray or dimmed text in the editor, behind your cursor. You can see this in Figure 1.1, where the cursor is on line 9. This is also called "ghost text." This text is a continuation of the code you already typed, and GitHub Copilot finds the most logical completion of the code and suggests it for you to accept.
Figure 1.1: Example of "ghost text" inside of VS Code
Accepting the code is as simple as hitting the Tab key, and the ghost text will be inserted at your cursor. The cursor will be moved to the end of the text that was inserted. Depending on what you were doing and how confident GitHub Copilot is in the suggestion, you can get either a word, a complete line, or multiple lines of code. It is then completely up to you what you want to do with that suggestion: you can use it as was proposed, you can accept parts of it, or you cannot accept any of it. What we also see is that people read the suggestions and then revise either the direction they were going in or the surrounding code based on new insights.
As well as the suggestion functionality, GitHub Copilot has chat integration, where you can have a conversation with the tool about the currently open files. See Figure 1.2 for an example:
Figure 1.2: Example of a chat conversation with GitHub Copilot
In the chat interface, you can ask anything you can think of - here are some examples:
- What the major elements of the current open code base are
- How you can execute the tests that exist in your project
- To find missing edge cases in your test suite
- Create your pipelines for you in any Continuous Integration/Continuous Deployment (CI/CD) system you need
The possibilities are endless and entirely up to you. The chat interface is a great way to engage with your code. It does not matter whether you are a developer who is just getting started or an experienced engineer: GitHub Copilot offers something for everyone.
We find it especially helpful if you are new to a code base, where GitHub Copilot can help you quickly find your way around the parts that you want to take a look at. Another great use case is when working in a development language that you are not that familiar with: we started contributing to code written in coding languages we did not use before, because GitHub Copilot helps us understand how those languages work. If you understand the basics of programming, such as if statements, for loops, and arrays, you can get very far very fast with GitHub Copilot. Even if you do not fully understand these basics, if you have an exploratory mindset, GitHub Copilot can help guide you through this new environment in a pragmatic way:
- You can ask it to explain these features to you, and it will happily take you through these concepts step by step
- You can quickly find your way around the new code base by asking for an explanation of where the entry point is or how to build the application
- You can let GitHub Copilot explain the application by using diagrams to place the components in the right places for you, so you can quickly learn about the integration points between the backend and frontend
Since GitHub Copilot is that non-judgmental pair programming buddy that can help you with super basic tasks as well as more complex coding concepts, the chat function is a great tool for both people who are new to the field of coding, as well as for experienced engineers, and everything in between.
Having a basic understanding of the underlying technology of generative AI is paramount to having realistic expectations of what value these tools bring to the table. Knowing how GitHub Copilot produces code is explained in Chapter 2. With that knowledge, even more junior engineers can use GitHub Copilot to their advantage in researching and explaining coding concepts in the context of the current code base, where they can pick apart these concepts one by one. Since they understand that they need to double-check what GitHub Copilot produces, they can safely validate their own knowledge and grow their coding skills over time. Normal coding practices still apply, where we guide these engineers through the programming landscape and review the code they produce with that mindset, so they can grow in a safe manner. All this applies equally well to other non-technical stakeholders.
While suggestions and chat...
System requirements
File format: ePUB
Copy protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePub works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our ebook Help page.
File format: ePUB
Copy protection: without DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Use a reader that can handle the file format ePUB, such as Adobe Digital Editions or FBReader – both free (see eBook Help).
- Tablet/Smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePUB works well for novels and non-fiction books – i.e., 'flowing' text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook does not use copy protection or Digital Rights Management
For more information, see our eBook Help page.