Skip to main content

GitHub Copilot Cookbook

Learn how to use GitHub Copilot to accomplish specific tasks.

Spotlight

Implementing a feature from a GitHub Issue

Implementing a feature from a GitHub Issue

Give a GitHub issue to GitHub Copilot 명령 줄 인터페이스 (CLI), then steer the conversation to implement the feature.
    Diagnosing CI test failures

    Diagnosing CI test failures

    Use 코파일럿 CLI to pull CI logs, correlate failures to local code, and fix issues without leaving the terminal.
      Improving code readability and maintainability

      Improving code readability and maintainability

      공동 파일럿 채팅 can suggest ways to make your code easier to understand and maintain.

        예제 살펴보기 35

        • Creating templates

          공동 파일럿 채팅 can help you create templates to streamline your workflow and ensure consistency across your projects.
          • Communicate effectively
          • Author and optimize with Copilot
          • Scale institutional knowledge
          • Chat
        • Triage and summarize repository activity

          Copilot can extract key information from repositories you follow to keep you up-to-date on recent activity.
          • Communicate effectively
          • Author and optimize with Copilot
          • Scale institutional knowledge
          • CLI
        • Synthesizing research

          Copilot Chat can help you synthesize research findings and insights from multiple sources into a cohesive summary.
          • Communicate effectively
          • Author and optimize with Copilot
          • Scale institutional knowledge
          • Chat
        • Creating diagrams

          GitHub Copilot Chat can help you create diagrams to better understand your data and communicate insights.
          • Communicate effectively
          • Visualize data
          • Scale institutional knowledge
          • Author and optimize with Copilot
          • Chat
        • Generating tables

          공동 파일럿 채팅 can help you create tables to organize information and present it clearly.
          • Communicate effectively
          • Author and optimize with Copilot
          • Scale institutional knowledge
          • Chat
        • Debugging invalid JSON

          공동 파일럿 채팅 can identify and resolve syntax errors or structural issues in JSON data.
          • Debugging code
          • Author and optimize with Copilot
          • Improve quality and maintainability
          • Chat
        • Handling API rate limits

          공동 파일럿 채팅 can help handle API rate limits by suggesting code that detects them and implements retry logic.
          • Debugging code
          • Author and optimize with Copilot
          • Improve quality and maintainability
          • Chat
        • Diagnosing CI test failures

          Use 코파일럿 CLI to pull CI logs, correlate failures to local code, and fix issues without leaving the terminal.
          • Debugging code
          • Author and optimize with Copilot
          • Improve quality and maintainability
          • CLI
        • Exploring potential feature implementations

          공동 파일럿 채팅 can help explore different approaches for implementing a single feature.
          • Functionality analysis
          • Author and optimize with Copilot
          • Scale institutional knowledge
          • Chat
        • Analyzing and incorporating user feedback

          공동 파일럿 채팅 can enhance the process of incorporating user feedback into your project.
          • Functionality analysis
          • Author and optimize with Copilot
          • Scale institutional knowledge
          • Chat
        • Implementing a feature from a GitHub Issue

          Give a GitHub issue to GitHub Copilot 명령 줄 인터페이스 (CLI), then steer the conversation to implement the feature.
          • Author and optimize with Copilot
          • CLI
        • Improving code readability and maintainability

          공동 파일럿 채팅 can suggest ways to make your code easier to understand and maintain.
          • Refactoring code
          • Author and optimize with Copilot
          • Improve quality and maintainability
          • Chat
        • Fixing lint errors

          공동 파일럿 채팅 can suggest ways to fix issues identified by a code linter.
          • Refactoring code
          • Author and optimize with Copilot
          • Improve quality and maintainability
          • Chat
        • Refactoring for performance optimization

          공동 파일럿 채팅 can suggest ways to speed up slow-running code.
          • Refactoring code
          • Author and optimize with Copilot
          • Improve quality and maintainability
          • Chat
        • Refactoring for environmental sustainability

          공동 파일럿 채팅 can suggest ways to make code more environmentally friendly.
          • Refactoring code
          • Improve quality and maintainability
          • Author and optimize with Copilot
          • Chat
        • Refactoring to implement a design pattern

          공동 파일럿 채팅 can suggest design patterns that you can use to improve your code.
          • Refactoring code
          • Author and optimize with Copilot
          • Improve quality and maintainability
          • Chat
        • Refactoring data access layers

          공동 파일럿 채팅 can suggest ways to decouple your data access code from your business logic, making an application easier to maintain and scale.
          • Refactoring code
          • Author and optimize with Copilot
          • Improve quality and maintainability
          • Chat
        • Decoupling business logic from UI components

          공동 파일럿 채팅 can help you separate your business logic from your user interface code, making it easier to maintain and scale your application.
          • Refactoring code
          • Author and optimize with Copilot
          • Improve quality and maintainability
          • Chat
        • Handling cross-cutting concerns

          공동 파일럿 채팅 can help you avoid code that relates to a concern other than the core concern of the method or function in which the code is located.
          • Refactoring code
          • Author and optimize with Copilot
          • Improve quality and maintainability
          • Chat
        • Simplifying complex inheritance hierarchies

          공동 파일럿 채팅 can help you to refactor code to avoid classes with multiple layers of inheritance.
          • Refactoring code
          • Author and optimize with Copilot
          • Improve quality and maintainability
          • Chat
        • Fixing database deadlocks or data integrity issues

          공동 파일럿 채팅 can help you avoid code that causes slow or blocked database operations, or tables with missing or incorrect data.
          • Refactoring code
          • Author and optimize with Copilot
          • Improve quality and maintainability
          • Chat
        • Translating code to a different programming language

          공동 파일럿 채팅 can help you rewrite code to perform the same operations but in a different programming language.
          • Refactoring code
          • Author and optimize with Copilot
          • Improve quality and maintainability
          • Chat
        • Filing issues without breaking your flow

          When something catches your attention mid-task, use 코파일럿 CLI to file a GitHub issue with code context, linked PRs, and labels, then get back to what you were doing.
          • Documenting code
          • Author and optimize with Copilot
          • CLI
        • Documenting legacy code

          공동 파일럿 채팅 can help with documenting legacy code.
          • Documenting code
          • Author and optimize with Copilot
          • Scale institutional knowledge
          • Chat
        • Explaining legacy code

          공동 파일럿 채팅 can help with explaining unfamiliar code.
          • Documenting code
          • Author and optimize with Copilot
          • Scale institutional knowledge
          • Chat
        • Explaining complex algorithms or logic

          공동 파일럿 채팅 can help add clear and concise documentation on complex algorithms or logic.
          • Documenting code
          • Author and optimize with Copilot
          • Scale institutional knowledge
          • Chat
        • Syncing documentation with code changes

          공동 파일럿 채팅 can help with keeping code documentation up-to-date.
          • Documenting code
          • Author and optimize with Copilot
          • Scale institutional knowledge
          • Chat
        • Writing discussions or blog posts

          공동 파일럿 채팅 can help you generate ideas, outline, or draft discussions or blog posts.
          • Documenting code
          • Author and optimize with Copilot
          • Scale institutional knowledge
          • Chat
        • Generating unit tests

          공동 파일럿 채팅 can help with generating unit tests for a function.
          • Testing code
          • Author and optimize with Copilot
          • Improve quality and maintainability
          • Chat
        • Creating mock objects to abstract layers

          공동 파일럿 채팅 can help with creating mock objects that you can use for unit tests.
          • Testing code
          • Author and optimize with Copilot
          • Improve quality and maintainability
          • Chat
        • Creating end-to-end tests for a webpage

          공동 파일럿 채팅 can help with generating end-to-end tests.
          • Testing code
          • Author and optimize with Copilot
          • Improve quality and maintainability
          • Chat
        • Updating unit tests to match code changes

          공동 파일럿 채팅 can help with updating your tests.
          • Testing code
          • Author and optimize with Copilot
          • Improve quality and maintainability
          • Chat
        • Securing your repository

          공동 파일럿 채팅 can help you to secure your repository and your code.
          • Security analysis
          • Author and optimize with Copilot
          • Improve quality and maintainability
          • Chat
        • Managing dependency updates

          공동 파일럿 채팅 can help you get set up with Dependabot to streamline dependency updates.
          • Security analysis
          • Author and optimize with Copilot
          • Improve quality and maintainability
          • Chat
        • Finding existing vulnerabilities in code

          Copilot Chat can help find common vulnerabilities in your code and suggest fixes.
          • Security analysis
          • Author and optimize with Copilot
          • Improve quality and maintainability
          • Chat