Study Guide · GH-300

GH-300 Cheat Sheet

432 entries · 14 chapters · 6 domains

Use GitHub Copilot features

Use GitHub Copilot in the IDE

Read full chapter
  • IDE access requires the supported integration, sign-in, and Copilot access
  • Visual Studio Code installs the required Copilot extensions automatically during setup
  • Organization policy can remove IDE Chat or agent mode from an entitled account
  • Editor settings can enable or disable inline suggestions by language
  • Ghost-text suggestions appear at the current cursor as code is typed
  • Developers can accept, reject, or partially accept inline suggestions
  • The public-code policy determines whether matching inline suggestions are withheld or referenced
  • Changing the completion model affects ghost text but not Chat or next edits
  • Next edit suggestions predict both where and what to edit
  • Next edit support differs from ordinary inline-completion support
  • Next edit suggestions have an enablement state separate from ghost text
  • Ask mode answers and proposes code without autonomously implementing a task
  • Inline Chat brings a conversational request to selected or nearby editor code
  • Chat references reveal which context contributed to a response
  • Slash commands invoke common Chat tasks without rewriting their full prompts
  • Agent mode is triggered from the Chat mode or agent selector
  • A missing Agent selector can indicate an administrator-disabled policy
  • Content exclusion is configured by repository, organization, or enterprise administrators
  • Excluded files lose inline suggestions and are withheld as Copilot context
  • Repository exclusions use case-insensitive path patterns within that repository
  • IDE Edit and Agent modes do not currently honor content exclusion
  • Content exclusion changes may require propagation or an IDE reload

Unlock with Premium — includes all practice exams and the complete study guide.

Use GitHub Copilot CLI

Read full chapter
  • Copilot CLI is an AI agent used directly from the terminal
  • Copilot CLI is available across Copilot plans but can be organization-gated
  • Copilot CLI can perform both local project work and GitHub.com tasks
  • Copilot CLI has platform-appropriate supported installation methods
  • The npm installation uses the current @github/copilot package
  • First use authenticates the CLI with the Copilot-enabled GitHub account
  • A successful CLI installation does not override an organization's disabled CLI policy
  • The gh copilot command bootstraps and launches the standalone Copilot CLI
  • The copilot command starts a conversational interactive session
  • CLI plan mode structures a task before code is written
  • Interactive steering can queue follow-ups or redirect work in progress
  • A resumed CLI session restores its conversation history
  • Autopilot mode trades per-action approval for hands-free local execution
  • Copilot CLI includes specialized agents for common terminal workflows
  • CLI delegation can move a task to Copilot cloud agent for background execution
  • CLI slash commands control the session rather than becoming shell commands
  • The context command shows how the active context window is being used
  • Context compaction summarizes history so a long CLI conversation can continue
  • Chronicle features answer questions about persisted CLI session history
  • The diff command provides an inspection surface for CLI file changes
  • The review command asks the CLI code-review agent to analyze changes
  • Rewind can roll a CLI session back to an earlier turn and restore its file changes
  • Repository memory carries validated project facts into later CLI sessions
  • Cross-session memory can answer questions about work beyond one saved transcript
  • The prompt option runs one task non-interactively and then exits
  • Programmatic file changes or commands need an explicit approval policy
  • Programmatic mode composes Copilot with scripts and automation
  • Copilot CLI requests permission before using mutating or executable tools
  • Tool allow rules should grant only the command family the task needs
  • The directory used to launch Copilot CLI defines a trusted scope
  • A sandbox reduces the filesystem, network, or host impact of CLI actions
  • Copilot CLI honors governed content-exclusion policy for context
  • Restrict Copilot CLI tools to the task
  • Copilot CLI can locate relevant project files and apply requested changes
  • Generating a script and authorizing its execution are separate decisions
  • CLI file work can be reviewed in Git before committing or opening a pull request
  • File-generation prompts should name the validation and success criteria

Unlock with Premium — includes all practice exams and the complete study guide.

Use GitHub Copilot Features and Capabilities

Read full chapter
  • Copilot Edits applies a requested change across multiple files
  • Agent mode autonomously chooses implementation steps and relevant files
  • Plan mode separates read-only planning from implementation
  • Agent mode can iterate on failures but cannot certify its own correctness
  • MCP servers extend Copilot with external data sources and actions
  • Agent mode can discover and invoke enabled MCP tools
  • Organization policy can govern MCP use in Copilot surfaces
  • An MCP server must be trusted for both the data and tools it exposes
  • Agent Plugins package reusable skills and MCP configuration for compatible Copilot clients
  • An agent task runs in a session that can be tracked and steered
  • A sub-agent performs delegated work in an isolated context window
  • Sub-agent delegation can be automatic or explicitly requested
  • By default, sub-agents return results rather than creating nested sub-agents
  • Copilot cloud agent performs asynchronous repository work in a GitHub-hosted environment
  • Copilot code review identifies issues and proposes applicable fixes
  • Copilot reviews are requested manually unless automatic review is configured
  • A default Copilot review comment does not satisfy required approval
  • Review effort should match the complexity and sensitivity of the change
  • Copilot code review uses its own model mix rather than the Chat model picker
  • A new push is not re-reviewed unless that trigger is configured or requested
  • Copilot Spaces organize reusable context for grounded conversations
  • GitHub-based sources in a Space stay synchronized as they change
  • Sharing a Space does not grant access to its restricted sources
  • Spaces are used in GitHub Chat and can reach an IDE through the GitHub MCP server
  • GitHub-backed sources in a Copilot Space stay synchronized
  • GitHub Spark was a natural-language full-stack application builder
  • GitHub Spark is no longer a current choice for creating a new app
  • A pull request summary drafts an overview of changes for reviewers
  • A generated pull request summary remains an editable draft
  • Pull request summaries can be incomplete or inaccurate and require validation
  • Repository-wide Copilot review standards belong in the Copilot instructions file
  • Path-specific review standards belong in scoped instructions files
  • AGENTS.md provides standing repository rules across compatible agents
  • Code review reads customization from the pull request head branch
  • Available Chat models depend on the surface, plan, and organization policy
  • Chat responses are constrained by available context and can be wrong
  • Chat commands and participants vary by host and active context
  • Response feedback reports quality but does not directly correct the active answer
  • Prompt files encode reusable prompts for tasks invoked on demand
  • Workspace prompt files make a repeatable interaction versionable and shareable
  • Prompt files and custom instructions solve different reuse problems
  • Prompt-file support must be checked for the target IDE

Unlock with Premium — includes all practice exams and the complete study guide.

Manage Organization-Wide Settings and Policies

Read full chapter
  • Organization policies govern features for users licensed by that organization
  • An organization cannot override a policy fixed by its enterprise
  • An organization-provided plan replaces a member's individual Copilot plan
  • Feature availability and additional model availability are separate policy areas
  • Policy must be evaluated for the surface where the feature is used
  • GitHub.com enablement gates organization preview and feedback options
  • The Editor preview features policy can gate the inline model picker
  • A feature requirement must be matched to a plan before its policy is configured
  • Organization-provided users need the Copilot code review policy enabled
  • Code review for members without licenses requires both paid usage and explicit access
  • Organization owners can scope automatic reviews across selected repositories
  • Enabled code review can fall back when agentic runner capabilities are unavailable
  • The audit log records Copilot plan, policy, setting, and license changes
  • Audit-log filters distinguish Copilot plan events from agent activity
  • The standard Copilot audit log does not contain local prompt transcripts
  • Stream audit events when an investigation needs history beyond GitHub retention
  • Content exclusion changes are auditable
  • Copilot REST endpoints expose subscription settings and assigned seats
  • Subscription endpoints assign Copilot seats to users or teams
  • Subscription endpoints revoke Copilot access by user or team
  • Seat-changing API calls require stronger authorization than seat reads
  • IDE activity in seat records depends on client telemetry
  • Removing the final assigned seat cancels the organization's Copilot plan

Unlock with Premium — includes all practice exams and the complete study guide.

Understand GitHub Copilot data and architecture

Describe Copilot Data Handling and Flow

Read full chapter
  • Copilot interaction data includes both request and response material
  • Individual subscribers can disable use of interactions for model training
  • Business and Enterprise customer data is not used to train AI models
  • Product feedback actions provide signals for future improvement
  • The selected model determines which hosting infrastructure processes a request
  • Provider data commitments must be evaluated per model
  • BYOK transmits prompts and responses to the selected provider
  • BYOK does not necessarily route every agent action through the chosen provider
  • Open-weight model developers need not receive Copilot prompts
  • Inline prompt construction uses code on both sides of the cursor
  • Relevant open tabs can contribute context to an inline prompt
  • Edit history and cursor position are structured before model inference
  • File and project metadata help shape inline prompts
  • Chat combines explicit input with available work context
  • Chat history supplies context for follow-up requests
  • Chat responses can combine model knowledge with grounded sources
  • Web grounding creates an external search query from request context
  • Repository instructions can be added automatically to IDE chat prompts
  • VS Code supplies implicit editor context before an agent expands it
  • Hash mentions deliberately add named sources to agent context
  • Agent diagnostics reveal the context assembled for a model interaction
  • Pull request summary prompts are built from code diffs
  • Pull request text completion uses description-writing context
  • Commit message generation uses the changes selected for commit
  • Terminal chat adds shell identity and conversation history to prompts
  • Copilot Spaces augments requests with a relevant subset of curated content
  • Prompts are transmitted to Copilot services over HTTPS
  • The Copilot proxy checks the assembled prompt before model inference
  • Input content filtering can stop harmful prompts before generation
  • System instructions constrain inline generation to a narrow task
  • Generated output passes through safety filters before presentation
  • Provider-hosted model output still traverses GitHub filtering
  • Blocked public-code matches are withheld from the user
  • Each Copilot surface formats model output for its interaction model

Unlock with Premium — includes all practice exams and the complete study guide.

Assess the Copilot Lifecycle and Limits

Read full chapter
  • A code suggestion moves through ordered processing stages
  • Model inference operates on the constructed prompt and context
  • Inline code and pull request text completion use different generation flows
  • Inline output remains visually distinct until accepted
  • The developer controls the disposition of an inline suggestion
  • Pull request text completion also requires an accept-or-reject choice
  • A terminal command suggestion is not executed automatically
  • Language representation affects suggestion quality
  • Inline context may not reveal system-level design problems
  • Large pull requests can exceed summary and completion context
  • Space context should stay selective and task-relevant
  • Automatically supplied custom instructions guide rather than guarantee output
  • Plausible generated code can still be incorrect
  • Generated code can contain vulnerabilities or expose sensitive information
  • Generated explanations can be inaccurate or fabricated
  • Generated tests may omit important scenarios
  • Suggested commands can perform destructive operations
  • Training-data patterns can propagate bias and errors
  • Model output is nondeterministic
  • Model choice changes the quality and safety profile
  • Functional correctness requires human review and testing
  • Security-sensitive output requires secure coding review
  • Automated analysis adds validation layers to generated code
  • Focused, current context mitigates finite-context limitations

Unlock with Premium — includes all practice exams and the complete study guide.

Improve developer productivity with GitHub Copilot

Enhance Productivity and Code Quality

Read full chapter
  • Natural-language comments can cue code suggestions
  • Specific requirements constrain generated code
  • Complex generation tasks should be decomposed
  • Examples steer generated interfaces and behavior
  • Generated code requires review and execution
  • Refactoring preserves observable behavior
  • Understand code before refactoring it
  • Repeated logic can be extracted for reuse
  • Multi-purpose functions can be split into focused units
  • Refactors should name the target convention
  • Code context can seed API documentation
  • Project documentation needs project context
  • Documentation should capture contracts and rationale
  • Generated documentation must be reviewed
  • In-context explanations reduce reference switching
  • Follow-up prompts can adapt an explanation
  • Comparisons can accelerate language learning
  • Debugging prompts need symptoms and expectations
  • Schema context shapes usable sample data
  • Sample-data prompts should state the required shape
  • Relational sample data should preserve valid links
  • Generated data needs integrity validation
  • Explain the legacy system before converting it
  • A test plan baselines legacy behavior
  • Modernization starts with dependencies and blockers
  • Legacy migration should proceed incrementally
  • Build-and-test loops validate modernization
  • Modernization continues after mechanical conversion

Unlock with Premium — includes all practice exams and the complete study guide.

Support Testing and Security

Read full chapter
  • Unit-test generation starts from target code
  • Existing tests convey framework conventions
  • Complex unit-test generation needs staged prompts
  • Unit tests isolate external dependencies
  • Unit tests should target observable behavior
  • Integration tests verify component interactions
  • Integration prompts should specify dependency handling
  • End-to-end tests cover user-visible flows
  • Generated integration tests must be executed and reviewed
  • Boundary tests exercise values around limits
  • Input tests include null, empty, and unexpected types
  • Failure paths should preserve protected state
  • Copilot can inventory missing scenarios
  • Assertions should verify contract outputs
  • Assertions should verify expected errors
  • Assertions can verify collaborator interactions
  • Generated tests should separate setup, action, and assertion
  • Security review checks untrusted input handling
  • Security review checks authentication and authorization
  • Security review checks sensitive-data exposure
  • Suggested dependencies require independent verification
  • Copilot security feedback does not replace security controls
  • Performance prompts should identify the hotspot
  • Copilot can suggest algorithm and data-structure changes
  • Loop-invariant work should not repeat per iteration
  • Performance review includes data access and blocking work
  • Performance suggestions require measurement and correctness checks

Unlock with Premium — includes all practice exams and the complete study guide.

Configure privacy, content exclusions, and safeguards

Manage privacy settings and exclusions

Read full chapter
  • Excluded files receive no inline suggestions
  • Excluded content cannot ground completions in other files
  • Excluded content is omitted from supported Chat context
  • Copilot code review omits excluded files
  • An IDE can indirectly expose semantic information from an excluded file
  • Content exclusion requires a managed Copilot plan
  • Repository administrators set repository-scoped exclusions
  • Organization exclusions follow the organization-provided seat
  • Enterprise exclusions cover all Copilot users in the enterprise
  • Maintainers can view but cannot edit repository exclusions
  • Inherited exclusions are visible but read-only
  • Repository rules list paths as separate items
  • A leading slash anchors a path to the repository root
  • A bare filename matches in any repository directory
  • Exclusion globs use case-insensitive fnmatch semantics
  • The star repository key covers Git and non-Git files
  • An organization rule maps a repository reference to paths
  • Repository references normalize common clone protocols
  • Organization and enterprise owners can manage exclusions through REST
  • Edit and agent modes do not support content exclusion
  • IDEs may indirectly expose semantic information from excluded files
  • Symlinks and remote filesystems are outside exclusion support
  • Website and mobile exclusion support remains preview
  • The Copilot app and Copilot CLI honor configured content exclusions
  • Content exclusions do not protect symlinks or repositories on remote filesystems
  • Editor controls can disable completions globally or by language
  • Language-specific completion settings override wildcards
  • Next edit suggestions have separate enablement
  • GitHub does not claim ownership of Copilot inputs or outputs
  • The purchase channel determines the governing Copilot terms
  • Managed customer data is not used for model training by default
  • Output claim defense depends on the customer's agreement
  • Nonownership by GitHub does not clear third-party rights
  • Generated code may introduce security risk
  • Human review remains accountable for Copilot output
  • Individual users can opt out of model training
  • Repository URLs used for exclusion lookup are not logged

Unlock with Premium — includes all practice exams and the complete study guide.

Apply safeguards and troubleshoot

Read full chapter
  • Individual subscribers can allow or block public-code matches
  • Managed-seat users inherit the public-code policy
  • Enterprise policy constrains organization policy
  • The public-code policy is model-independent
  • Matching compares a suggestion with its surrounding code
  • Block mode withholds matches and near matches
  • Private and off-GitHub code is outside the matching index
  • The public-code index can lag repository state
  • Allow mode enables references instead of suppressing matches
  • Inline references check accepted, unchanged suggestions
  • Inline reference logs record source and available license data
  • Chat surfaces link matching-code details with responses
  • Code references support rather than replace license review
  • Current Copilot indemnity is agreement-dependent; public-code filtering is optional
  • Chat match handling depends on the client
  • The cloud agent can match public code despite Block policy
  • Copilot CLI can match public code despite Block policy
  • Third-party agent policy support is annotate-only
  • Content filters target harmful, offensive, and insecure output
  • Safety filters do not certify correctness or security
  • Privacy and public-code controls solve different risks
  • Service incidents are checked on GitHub Status
  • Old Copilot extensions can lose server compatibility
  • The excluded-file status icon identifies the applied restriction
  • Xcode native completions can duplicate Copilot suggestions
  • Extension activation failure can be a plan or token error
  • Loaded IDEs can delay new exclusion rules
  • Each IDE has a documented exclusion refresh method
  • An exclusion test needs a nonexcluded control file
  • A Chat exclusion test isolates the attached file
  • Copilot logs ground connection diagnosis
  • Firewalls must allow the required Copilot hosts
  • Proxy authentication must use a supported method
  • The latest Copilot Chat requires the latest Visual Studio Code
  • Rate-limit errors require waiting, capacity changes, or support
  • Refresh Visual Studio Code authentication before diagnosing policy

Unlock with Premium — includes all practice exams and the complete study guide.

Apply prompt engineering and context crafting

Craft Effective Prompts

Read full chapter
  • Lead with the goal before listing detailed requirements
  • State the input and output contract explicitly
  • Declare implementation constraints that affect the solution
  • Define success with verifiable outcomes
  • Name the exact code element a request refers to
  • Replace vague quality terms with concrete changes
  • Explain the purpose of an uncommon library
  • Identify a required library instead of leaving the choice implicit
  • Curate open files around the current task
  • Select the code that an IDE chat request should target
  • Explicitly attach context that the answer must consider
  • Readable project code provides stronger prompting signals
  • Attach visual and rendered-page evidence as explicit VS Code chat context
  • Zero-shot prompting supplies instructions without examples
  • Use zero-shot prompting first for familiar standard tasks
  • Use zero-shot output as a performance baseline
  • Zero-shot prompting avoids demonstration overhead
  • Few-shot prompting demonstrates the desired pattern with several examples
  • Examples can demonstrate inputs, outputs, or implementations
  • Unit tests can act as executable prompting examples
  • Use representative examples that do not imply a false pattern
  • Split a large task into small focused requests
  • Sequence dependent subtasks so later prompts build on verified work
  • Give each subtask its own observable result
  • Resolve an unclear approach before requesting implementation
  • Assign a relevant expert role for a specialized task
  • Specify the response form the task requires
  • Ask Copilot to clarify ambiguous requirements before acting
  • Keep Copilot Chat prompts focused on coding and technology

Unlock with Premium — includes all practice exams and the complete study guide.

Engineer Prompts for Performance

Read full chapter
  • Refine a response by adding focused constraints
  • Choose between modifying a useful suggestion and restarting a poor one
  • Rephrase or narrow an unhelpful request
  • Course-correct as soon as the response takes a wrong direction
  • A model request combines multiple context layers
  • The model can reason only over information in the current context
  • Tool results can expand context during an agent loop
  • Implicit context reflects the developer's current editor state
  • Workspace indexing selects relevant code by meaning
  • Automatic context discovery does not guarantee a particular source
  • VS Code #-mentions add a chosen type of context
  • Available context sources vary by Copilot surface
  • GitHub.com contextual chat accumulates page references during navigation
  • Every context source shares a bounded context window
  • Prefer focused context over maximum context volume
  • Compaction trades detail for additional context capacity
  • A growing context can reduce response quality
  • Chat history supplies context for follow-up references
  • A focused history supports progressive refinement
  • Conversation history is scoped to its session
  • Session history provides context rather than retraining the model
  • Chat history supplies context for follow-up prompts within the conversation
  • Start a new session for an unrelated task
  • Remove history that is stale or led to a failed result
  • Summarize essential context before continuing a long thread
  • Compact a long but still-focused conversation
  • Copilot preprocesses the prompt and combines it with context
  • The language model generates from the assembled input and context
  • Copilot formats the generated response for presentation
  • The Copilot surface controls which context can enter the flow

Unlock with Premium — includes all practice exams and the complete study guide.

Use GitHub Copilot responsibly

Understand Responsible AI Principles

Read full chapter
  • Hallucinations can sound plausible while being false
  • Training-data coverage affects output quality
  • Local context can hide system-level problems
  • Generated tests do not guarantee complete coverage
  • Custom instructions cannot guarantee identical compliance
  • Fairness requires equitable treatment of similarly situated groups
  • Training data can propagate existing bias and errors
  • Representative data reduces avoidable bias
  • Segment-level monitoring reveals hidden disparities
  • Human controls must be able to override unfair outcomes
  • Adversarial debiasing is a distinct fairness-mitigation technique
  • Reliable systems handle expected and unexpected conditions safely
  • AI safety includes physical, psychological, and financial harm
  • Adversarial testing exposes harmful and insecure behavior
  • Safety filters reduce risk but do not remove review duties
  • Sensitive domains require stronger safeguards and recourse
  • Personal-data collection requires notice and informed choice
  • Data minimization limits privacy exposure
  • De-identification reduces exposure of personal identities
  • Sensitive data requires protection in transit, at rest, and in access
  • Prompt context can expose sensitive information
  • Inclusive systems serve diverse users without disadvantage
  • Accessibility requires alternative modes of interaction
  • Language and cultural adaptation are inclusion requirements
  • Connectivity and computing constraints affect inclusion
  • Diverse stakeholder participation improves inclusive design
  • Transparency discloses an AI system's role and limits
  • Interpretability makes system behavior understandable
  • Logging and reporting make AI decisions auditable
  • People remain accountable for AI systems and outcomes
  • AI risks must be governed, mapped, measured, and managed

Unlock with Premium — includes all practice exams and the complete study guide.

Validate and Operate AI Tools

Read full chapter
  • Developers must understand generated code before using it
  • Generated output must be checked against developer intent
  • Validation must exercise boundaries and error paths
  • Generated code must fit the codebase's architecture and standards
  • Independent tools strengthen output validation
  • Compiling generated code is not evidence of security
  • Generated code must be checked for common security antipatterns
  • Security-sensitive and critical code needs deeper validation
  • Security scanners add a distinct validation layer
  • Automated agent scanning does not guarantee safe output
  • Generated explanations can be inaccurate or incomplete
  • Generated pull request summaries require author review
  • Generated commit messages must reflect the final selected changes
  • AI code review can miss real defects
  • AI code review comments can be false positives
  • Relevant context improves Copilot responses
  • Irrelevant context can dilute output quality
  • Clear, scoped prompts improve control of generated output
  • Copilot performs best within its intended coding scope
  • Agent commands must be reviewed before approval
  • Agent tasks need explicit scope and acceptance criteria
  • Agent-generated changes require review before merge
  • Agent traceability supports accountable review
  • Stopping an agent request cannot roll back completed actions
  • A bang-prefixed chat command bypasses the agent approval flow
  • Generated code can match publicly available code
  • Potentially unoriginal code needs IP and security review
  • AI use must satisfy applicable laws, policies, and terms
  • Copilot augments rather than replaces human expertise
  • Overreliance amplifies hard-to-detect AI errors
  • Human review must precede consequential use of AI output
  • Responsible use requires current risk and product knowledge

Unlock with Premium — includes all practice exams and the complete study guide.