Skip to main content

Asking GitHub Copilot questions in GitHub

Get instant answers about your code, repositories, and development questions — right from GitHub.

In diesem Artikel

Submitting a question to Copilot-Chat

Copilot-Chat is available from any page on GitHub. Some questions work best in a specific context, such as a repository, issue, or pull request.

  1. Klicken Sie oben rechts auf einer Seite in GitHub auf die Schaltfläche neben der Suchleiste.

    Copilot-Chat wird angezeigt.

  2. In the prompt box, type a question and press Enter.

    Some examples of general questions you could ask are:

    • What are the advantages of the Go programming language?
    • What is Agile software development?
    • What is the most popular JavaScript framework?
    • Give me some examples of regular expressions.
    • Write a bash script to output today's date.
  3. Optional kannst du nach der Übermittlung einer Frage im Textfeld auf klicken, um die Antwort zu beenden.

  4. Within a conversation thread, you can ask follow-up questions. Copilot will answer within the context of the conversation.

Viewing an editing generated files

Hinweis

This feature is currently in öffentliche Vorschau and subject to change.

Copilot may generate files as part of its response, which you can view, edit, and download from the side panel.

Changing and comparing AI models

You can choose from a selection of AI models, each with different strengths. Different models have different premium request multipliers, which affect your monthly usage allowance. For details, see Anforderungen in GitHub Copilot.

Wenn du auf Copilot-Chat mit einem Copilot Business- oder Copilot Enterprise-Abonnement zugreifst, muss deine Organisation oder dein Unternehmen den Mitgliedern ermöglichen, zu einem anderen Modell zu wechseln. Weitere Informationen findest du unter Verwalten von Richtlinien und Features für GitHub Copilot in Ihrer Organisation oder Verwalten von Richtlinien und Features für GitHub Copilot in Ihrem Unternehmen.

  1. At the bottom of Copilot-Chat, select the CURRENT-MODEL dropdown menu, then click the AI model of your choice.

After submitting a prompt, you can also regenerate a response using a different model by clicking the retry icon () below the response. You can switch between responses to compare results.

Using subthreads in a conversation

Subthreads are branches of a conversation that let you explore aspects of a topic, or new topics, all within the same thread.

To create a subthread, hover over one of your previous questions and click the button. Edit the question, then click Send. You cannot edit any attachments.

The response to your edited question is displayed in a new subthread. An edit counter appears below the question. Hover over the counter, then click or to navigate between subthreads.

Using images in Copilot-Chat

Hinweis

This feature is currently in öffentliche Vorschau and subject to change.

You can attach images to your prompts by pasting, dragging, or clicking in the prompt box and then selecting Upload from computer. Select a model that supports images from the model picker. For supported file types and example questions, see Bereitstellen visueller Eingaben für GitHub Copilot.

Further reading