Skip to main content

GitHub Copilot 指南

了解如何用于 GitHub Copilot 完成特定任务。

聚焦

从GitHub问题实现功能

从GitHub问题实现功能

向GitHub提出一个问题GitHub Copilot 命令行界面 (CLI),然后引导对话朝着实现该功能的方向进行。
    Diagnosing CI test failures

    Diagnosing CI test failures

    Use Copilot 命令行界面(CLI) to pull CI logs, correlate failures to local code, and fix issues without leaving the terminal.
      提高代码可读性和可维护性

      提高代码可读性和可维护性

      副驾驶聊天 可以建议使代码更易于理解和维护的方法。

        浏览 35 示例

        • 创建模板

          副驾驶聊天 可帮助你创建模板,以简化工作流并确保项目中的一致性。
          • Communicate effectively
          • Author and optimize with Copilot
          • Scale institutional knowledge
          • Chat
        • 分类整理并汇总存储库活动

          Copilot 可以从你关注的存储库中提取关键信息,帮助你及时了解最近的活动。
          • Communicate effectively
          • Author and optimize with Copilot
          • Scale institutional knowledge
          • CLI
        • 合成研究

          Copilot 对话助手可帮助你将来自多个来源的研究结果和见解合成为一份连贯的摘要。
          • Communicate effectively
          • Author and optimize with Copilot
          • Scale institutional knowledge
          • Chat
        • 创建关系图

          GitHub Copilot 对话助手 可以帮助你创建图表,以便更好地了解数据并传达见解。
          • 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
        • 调试无效的 JSON

          副驾驶聊天 可以识别和解决 JSON 数据中的语法错误或结构问题。
          • Debugging code
          • Author and optimize with Copilot
          • Improve quality and maintainability
          • Chat
        • 处理 API 速率限制

          副驾驶聊天 通过建议检测 API 速率限制并实现重试逻辑的代码,可以帮助处理 API 速率限制。
          • Debugging code
          • Author and optimize with Copilot
          • Improve quality and maintainability
          • Chat
        • Diagnosing CI test failures

          Use Copilot 命令行界面(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
        • 分析和采纳用户反馈

          副驾驶聊天 可以增强将用户反馈合并到项目中的过程。
          • Functionality analysis
          • Author and optimize with Copilot
          • Scale institutional knowledge
          • Chat
        • 从GitHub问题实现功能

          向GitHub提出一个问题GitHub Copilot 命令行界面 (CLI),然后引导对话朝着实现该功能的方向进行。
          • Author and optimize with Copilot
          • CLI
        • 提高代码可读性和可维护性

          副驾驶聊天 可以建议使代码更易于理解和维护的方法。
          • 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 code
          • Author and optimize with Copilot
          • Improve quality and maintainability
          • Chat
        • 为环境可持续性进行重构

          副驾驶聊天 可以建议使代码更加环保的方法。
          • Refactoring code
          • Improve quality and maintainability
          • Author and optimize with Copilot
          • Chat
        • 重构以实现设计模式

          副驾驶聊天 可以建议可用于改进代码的设计模式。
          • Refactoring code
          • Author and optimize with Copilot
          • Improve quality and maintainability
          • Chat
        • 重构数据访问层

          副驾驶聊天 可以建议将数据访问代码与业务逻辑分离的方法,使应用程序更易于维护和缩放。
          • 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
        • 简化复杂的继承层次结构

          副驾驶聊天 可帮助你重构代码以避免具有多层继承的类。
          • 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
        • 将代码转换为其他编程语言

          副驾驶聊天 可帮助你重写代码以执行相同的操作,但使用不同的编程语言。
          • 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 Copilot 命令行界面(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 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
        • 解释复杂算法或逻辑

          副驾驶聊天 可以帮助添加有关复杂算法或逻辑的清晰简洁文档。
          • Documenting code
          • Author and optimize with Copilot
          • Scale institutional knowledge
          • Chat
        • 同步文档以适应代码更改

          副驾驶聊天 可以帮助保持代码文档为最新状态。
          • Documenting code
          • Author and optimize with Copilot
          • Scale institutional knowledge
          • Chat
        • 撰写讨论或博客文章

          副驾驶聊天 可以帮助你生成想法、大纲或草稿讨论或博客文章。
          • Documenting code
          • Author and optimize with Copilot
          • Scale institutional knowledge
          • Chat
        • 生成单元测试

          副驾驶聊天 可以帮助生成函数的单元测试。
          • 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
        • 为网页创建端到端测试

          副驾驶聊天 有助于生成端到端测试。
          • Testing code
          • Author and optimize with Copilot
          • Improve quality and maintainability
          • Chat
        • 更新单元测试以匹配代码更改

          副驾驶聊天 可以帮助你更新测试用例。
          • Testing code
          • Author and optimize with Copilot
          • Improve quality and maintainability
          • Chat
        • 保护您的仓库

          副驾驶聊天 可以帮助你保护存储库和代码。
          • Security analysis
          • Author and optimize with Copilot
          • Improve quality and maintainability
          • Chat
        • 管理依赖项更新

          副驾驶聊天 可以帮助你设置 Dependabot,以简化依赖项更新流程。
          • Security analysis
          • Author and optimize with Copilot
          • Improve quality and maintainability
          • Chat
        • 在代码中查找现有漏洞

          Copilot 对话助手 可以帮助查找代码中的常见漏洞并提供修复建议。
          • Security analysis
          • Author and optimize with Copilot
          • Improve quality and maintainability
          • Chat