CertavoPrepare. Certify. Excel.
Open menu
GH-300GitHubAssociate

GH-300: GitHub Copilot

This exam is intended for candidates who have expertise in using GitHub Copilot to improve software development productivity, quality, and security. It covers responsible AI use, prompt engineering, GitHub Copilot features across various plans, and privacy safeguards. Candidates should also be familiar with GitHub fundamentals and have experience with one or more programming languages.

What you get with membership

  • The full GH-300 question bank with detailed explanations
  • Readiness tracking by objective so you know when you're ready
  • Access to every other exam in the Certavo library
  • Content kept in step with the latest exam objectives

GH-300 exam objectives

The objective domains the GH-300 exam is built from.

Use GitHub Copilot features

27.5% of the exam

GitHub Copilot features

27.5% of the exam

Use GitHub Copilot responsibly

17.5% of the exam

Understand GitHub Copilot data and architecture

12.5% of the exam

Apply prompt engineering and context crafting

12.5% of the exam

Improve developer productivity with GitHub Copilot

12.5% of the exam

Configure privacy, content exclusions, and safeguards

12.5% of the exam

GH-300 practice questions and answers

11 free sample questions from the GH-300 bank, with the correct answer and a full explanation for each. These are original questions written to the GitHub objective domains — not real exam content.

  1. Question 1Apply prompt engineering and context crafting

    The current repository contains a parser and related unit tests, and you want Copilot Chat to help add support for a new input format. Which prompt and context choices are recommended?

    • ABegin with the overall goal, then list the exact behavior and constraints for the new format.
    • BInclude example inputs and expected outputs, or point Copilot to unit tests that define the behavior.
    • COpen or highlight the parser and related tests, and close files that are not relevant to the task.
    • DAsk Copilot to `make this work` in an old chat thread that was about a different feature.
    • ELeave every repository file open so Copilot has the maximum possible amount of context.
    Show answer and explanation

    Correct answers

    • Begin with the overall goal, then list the exact behavior and constraints for the new format.
    • Include example inputs and expected outputs, or point Copilot to unit tests that define the behavior.
    • Open or highlight the parser and related tests, and close files that are not relevant to the task.

    Explanation

    The correct choices give Copilot precise, relevant context: a broad goal followed by specific requirements, examples or tests that show the desired behavior, and the files or selected code Copilot should reference. Asking an ambiguous prompt such as make this work in an unrelated thread gives Copilot noisy chat history. Leaving every file open can also add irrelevant context; the guidance is to open relevant files and close irrelevant ones.

    References:

  2. Question 2Apply prompt engineering and context crafting

    Fill in the missing production-context filter name that selects deployed alerts with an internet-exposed runtime risk before you paste the results into a Copilot Chat prompt.

    text
    has:deployment AND 1:internet-exposed

    Blank 1

    • Aruntime-risk
    • Bartifact-registry
    • Cartifact-registry-url
    • Depss
    Show answer and explanation

    Correct answer

    • Blank 1: runtime-risk

    Explanation

    The correct filter is runtime-risk. GitHub documents has:deployment AND runtime-risk:internet-exposed as the filter pattern for focusing on alerts in deployed code that is exposed to the internet.

    • artifact-registry filters by a supported artifact registry such as JFrog Artifactory.
    • artifact-registry-url filters by a custom artifact repository URL.
    • epss is a separate risk-prioritization filter, such as epss > 0.5, not the runtime exposure filter.

    References:

  3. Question 3Configure privacy, content exclusions, and safeguards

    Before assigning Copilot Business seats to additional maintainers, you want safeguards that directly configure what Copilot can access or suggest. Which TWO controls are Copilot-specific safeguards?

    • AConfigure Copilot content exclusions for files and folders Copilot should not use.
    • BSet the organization policy for `Suggestions matching public code` to block matching suggestions.
    • CCreate `CODEOWNERS` entries for sensitive paths so pull requests require owner review.
    • DRequire signed commits on protected branches that contain production code.
    • EEnable Dependabot alerts for vulnerable dependencies in manifests.
    Show answer and explanation

    Correct answers

    • Configure Copilot content exclusions for files and folders Copilot should not use.
    • Set the organization policy for `Suggestions matching public code` to block matching suggestions.

    Explanation

    Copilot content exclusions configure paths that Copilot should not access or use, and the organization policy for Suggestions matching public code controls whether matching public-code suggestions are blocked. Both are Copilot-specific safeguards.

    CODEOWNERS, required signed commits, and Dependabot alerts are real repository governance or security features, but they do not configure Copilot's context access or public-code suggestion matching.

    References:

  4. Question 4Improve developer productivity with GitHub Copilot

    A repository contains a root-level `AGENTS.md` file with build, lint, and testing guidance, but it does not contain `.github/copilot-instructions.md`. What is the effect when preparing the repository for Copilot cloud agent work?

    • AIt can supply repository custom instructions, so maintainers should keep its guidance current.
    • BIt runs dependency setup steps, so maintainers should include package installation commands.
    • CIt configures code owner review requests, so maintainers should list owning teams.
    • DIt is ignored for Copilot guidance unless `.github/copilot-instructions.md` also exists.
    Show answer and explanation

    Correct answer

    • It can supply repository custom instructions, so maintainers should keep its guidance current.

    Explanation

    AGENTS.md is one of the custom instructions files that Copilot cloud agent checks. The maintainer should verify that it accurately describes the codebase, project structure, contribution guidance, and key technical principles.

    • .github/copilot-instructions.md is supported, but it is not the only supported repository instruction file.
    • Dependency preinstallation is handled by .github/workflows/copilot-setup-steps.yml, not by AGENTS.md.
    • Code owner review behavior is configured with CODEOWNERS, not with Copilot custom instructions.

    References:

  5. Question 5Improve developer productivity with GitHub Copilot

    During test-driven development, you want Copilot Chat in your IDE to propose tests before the implementation exists. Which prompt approach matches the documented behavior?

    • AAsk directly for tests for the desired behavior and omit `/tests`.
    • BRun `/tests` because it writes tests before any implementation exists.
    • CRun `/fix` because it generates a failing test from an error.
    • DRun `/newNotebook` because it creates tests for a new source file.
    Show answer and explanation

    Correct answer

    • Ask directly for tests for the desired behavior and omit `/tests`.

    Explanation

    For test-driven development, omit /tests and ask directly for tests that describe the desired behavior. The /tests slash command is intended to write tests for existing code in the active file or selected code.

    • /tests is useful after code exists, not when you want tests first.
    • /fix is for fixing an error in the active file.
    • /newNotebook creates a new Jupyter notebook, not tests for a future implementation.

    References:

  6. Question 6Improve developer productivity with GitHub Copilot

    Ravi, a developer, is triaging a Dependabot alert from GitHub Advanced Security in an IDE and wants Copilot Chat to identify the affected package. Which prompt fits the documented use case?

    • A`What library is affected by this Dependabot alert?`
    • B`How many alerts do I have on this pull request?`
    • C`Which line of code is this code scanning alert referencing?`
    • D`@terminal how to update an npm package`
    Show answer and explanation

    Correct answer

    • `What library is affected by this Dependabot alert?`

    Explanation

    Copilot Chat can answer questions about GitHub Advanced Security alerts, including Dependabot alerts. The prompt asking which library is affected directly targets the Dependabot alert context.

    • Asking how many alerts are on a pull request is a different security-alert question.
    • Asking which line a code scanning alert references applies to code scanning, not identifying the package in a Dependabot alert.
    • @terminal how to update an npm package asks for command-line help and does not use the Dependabot alert context.

    References:

  7. Question 7Improve developer productivity with GitHub Copilot

    You want to add a default repository instruction file that Copilot cloud agent will check before suggesting project changes. Complete the command.

    bash
    mkdir -p .github
    cat > 1 <<'EOF'
    # Copilot instructions
    - Run npm test before proposing changes.
    - Follow the existing project structure.
    EOF

    Blank 1

    • A.github/copilot-instructions.md
    • B.github/workflows/copilot-setup-steps.yml
    • C.github/dependabot.yml
    • D.github/CODEOWNERS
    Show answer and explanation

    Correct answer

    • Blank 1: .github/copilot-instructions.md

    Explanation

    The correct path is .github/copilot-instructions.md. Copilot cloud agent checks repository custom instruction files such as .github/copilot-instructions.md, .github/instructions/**/*-instructions.md, and AGENTS.md.

    • .github/workflows/copilot-setup-steps.yml is for preparing the cloud agent environment by installing dependencies.
    • .github/dependabot.yml configures Dependabot.
    • .github/CODEOWNERS configures code owner review requests.

    References:

  8. Question 8Improve developer productivity with GitHub Copilot

    Select TWO documented ways Copilot Chat can help with code you already have open in an IDE.

    • AUse `/fix` when the active file contains an error.
    • BUse `/tests` to write tests for the active file or selected code.
    • CUse `/new` to scaffold a new project from a prompt.
    • DUse `@terminal` to ask about command-line tasks.
    Show answer and explanation

    Correct answers

    • Use `/fix` when the active file contains an error.
    • Use `/tests` to write tests for the active file or selected code.

    Explanation

    /fix and /tests are documented Copilot Chat slash commands for working with existing code in the editor.

    • /fix asks Copilot to fix an error in the active file.
    • /tests writes tests for the active file or selected code.
    • /new is for setting up a new project, not for code that is already open.
    • @terminal is for command-line questions rather than editing or testing the open source file.

    References:

  9. Question 9Improve developer productivity with GitHub Copilot

    The repository will use Copilot cloud agent frequently, and dependency installation is slowing down each task. Which TWO details should be present in the setup workflow so the agent can use it as intended?

    • ACreate the workflow at `.github/workflows/copilot-setup-steps.yml`.
    • BName the workflow job `copilot-setup-steps`.
    • CPut the dependency installation commands in `AGENTS.md`.
    • DConfigure the dependency setup in `.github/dependabot.yml`.
    • EUse a `pull_request_target` trigger for every pull request in the repository.
    Show answer and explanation

    Correct answers

    • Create the workflow at `.github/workflows/copilot-setup-steps.yml`.
    • Name the workflow job `copilot-setup-steps`.

    Explanation

    The setup workflow for Copilot cloud agent is a GitHub Actions workflow with a specific path and job name.

    • .github/workflows/copilot-setup-steps.yml is correct because the agent looks for the setup workflow at that path.
    • A job named copilot-setup-steps is correct because the documented workflow job must use that job name.
    • AGENTS.md is wrong for this requirement. It is a supported custom instructions file, but it is not the Actions workflow that pre-installs dependencies.
    • .github/dependabot.yml is wrong because Dependabot configuration manages dependency updates, not the cloud agent environment setup workflow.
    • A broad pull_request_target trigger is wrong because the documented setup workflow uses workflow_dispatch and path-filtered push and pull_request triggers for the setup file.

    References:

  10. Question 10Improve developer productivity with GitHub Copilot

    Which Copilot Chat request in the IDE is best suited to creating a new Jupyter notebook from a high-level description?

    • A`/newNotebook retrieve the dataset and plot it with Seaborn`
    • B`/new python django web application`
    • C`/tests using Pytest`
    • D`@workspace create a notebook for this repository`
    Show answer and explanation

    Correct answer

    • `/newNotebook retrieve the dataset and plot it with Seaborn`

    Explanation

    /newNotebook is the slash command for setting up a new Jupyter notebook from a prompt.

    • /newNotebook retrieve the dataset and plot it with Seaborn is correct because it targets new notebook creation.
    • /new python django web application is wrong because /new scaffolds a new project, not specifically a Jupyter notebook.
    • /tests using Pytest is wrong because /tests writes tests for existing code.
    • @workspace create a notebook for this repository is wrong because @workspace provides project context; it is not the documented notebook scaffolding command.

    References:

  11. Question 11Improve developer productivity with GitHub Copilot

    A maintainer has a paid Copilot plan assigned and wants to use Copilot cloud agent without changing repository ownership or feature settings. Which target can use the agent under the documented availability rules?

    • AA repository stored on GitHub in a regular organization where cloud agent has not been disabled.
    • BA repository owned by a managed user account, with the same paid Copilot plan assigned.
    • CA repository stored on GitHub where an administrator explicitly disabled cloud agent.
    • DA local source folder opened in the IDE that is not backed by a repository stored on GitHub.
    Show answer and explanation

    Correct answer

    • A repository stored on GitHub in a regular organization where cloud agent has not been disabled.

    Explanation

    The target must satisfy both requirements: the user must be on a paid Copilot plan, and the repository must be stored on GitHub without falling into an excluded category.

    • A GitHub repository in a regular organization where cloud agent has not been disabled is correct.
    • A repository owned by a managed user account is wrong because those repositories are excluded.
    • A repository where cloud agent was explicitly disabled is wrong because the repository setting prevents use.
    • A local folder that is not a repository stored on GitHub is wrong because the cloud agent availability is described for repositories stored on GitHub.

    References:

Membership includes 199 questions and explanations aligned to the GH-300 curriculum, including 10 case studies.

Other GitHub certifications

Every one of these is included with the same membership as GH-300.

GH-300 exam FAQ

How many questions are on the GH-300 exam?+

The GH-300 (GitHub Copilot) exam has around 50 questions. Question counts vary slightly between exam forms, so treat this as the typical number rather than a guarantee.

How long is the GH-300 exam?+

You get 100 minutes for the GH-300 exam itself. Allow extra time at the test centre or for the online check-in process before the timer starts.

What level is GH-300?+

GH-300 is a GitHub associate-level certification.

Are there free GH-300 practice questions?+

Yes. 11 free GH-300 practice questions are on this page, each with the correct answer and a full explanation. The complete bank of 199 questions is included with membership.

Are these real GH-300 exam questions?+

No. Every question is original, written to match the published GH-300 objective domains and question styles. Real exam content is confidential, and reusing it would breach GitHub's exam policies.