SaveMyCert
Log in
5 of 5 free questions left today·for 30 a day
GH-900 practice

GH-900 sample questions — 25 answered and explained

25 GH-900 sample questions written to the official GitHub Foundations exam guide, grouped by exam domain and weighted like the real exam. Each shows the correct answer, why every other option is wrong, and the lesson that teaches it. None of them repeat the examples on the other GH-900 practice pages.

On this page
25
answers included
Full bank
247
on the practice page
Domains
7
weighted like the exam
Free, no account
5/day
a free account allows 30 a day

Domain 1: Understand Git and GitHub basics

28% of the GH-900 exam, so 7 of the 25 questions on this page.

Question 1Understand Git and GitHub basics

Which TWO are features that GitHub adds on top of Git? (Select TWO.)

Choose TWO.

  • a
    Pull requests for proposing changes and reviewing them Correct

    Pull requests are a GitHub feature: a web page where a proposed set of changes is discussed, reviewed and merged.

  • b
    Issues for tracking bugs, tasks and feature requests Correct

    Issues are GitHub's built-in tracker for bugs, tasks and ideas. Git itself has no issue tracking.

  • c
    Commits for recording snapshots of the project's tracked files

    Commits are a core Git concept and exist without GitHub.

  • d
    Branches for keeping separate lines of development isolated

    Branches are created and managed by Git itself, locally.

  • e
    Merges for combining the histories of two branches into one

    Merging is a Git operation. GitHub can trigger a merge from a pull request, but merging itself comes from Git.

The concept

GitHub adds collaboration features (pull requests, issues, Actions, discussions, permissions) around the version control that Git provides.

Why that’s the answer

Git provides the version control mechanics: commits, branches and merges. GitHub hosts Git repositories and wraps them with collaboration and project features such as pull requests for code review and issues for tracking work. Because a pull request ends in a merge, merging is the tempting distractor, but the merge itself is Git's operation.

How to reason it out
  1. Sort each option into 'Git mechanics' or 'GitHub collaboration'.
  2. Commits, branches and merges are Git mechanics.
  3. Pull requests and issues exist only on the hosting platform.
  4. Choose pull requests and issues.

Exam tip: Commit, branch, merge: Git. Pull requests, issues: GitHub.

Git vs GitHub: Version Control Fundamentals for GitHub Foundations (GH-900) — the lesson that teaches this.

Question 2Understand Git and GitHub basics

A team already uses Git, with repositories on a plain shared Git server. The team lead asks what moving the repositories to GitHub would add. Which item would GitHub add that the team does not already have?

Choose one.

  • a
    A complete copy of the project history on each developer's clone

    Every Git clone already has the full history; that comes from Git being distributed, not from GitHub.

  • b
    The ability to create branches and switch between them quickly

    Creating and switching branches is a Git feature the team already has.

  • c
    A web interface for reviewing and discussing proposed changes Correct

    Pull request reviews with comments, approvals and discussion are a GitHub feature. A plain Git server has nothing like it.

  • d
    A unique identifier for each commit recorded in the repository

    Git already gives every commit a unique hash, whatever server the repository is on.

The concept

GitHub adds collaboration around Git repositories, for example code review on pull requests; history, branching and commit IDs come from Git.

Why that’s the answer

The team already has everything Git provides: full history in each clone, branching and unique commit hashes. What a plain Git server does not offer is GitHub's collaboration layer, such as pull requests with line comments, reviews and approvals, issues, and GitHub Actions. The distractors are all genuine benefits of version control, but the team already has them.

How to reason it out
  1. Note what the team already has: Git plus a shared server.
  2. List what comes with Git itself: history, branches, commit IDs.
  3. Identify what only the platform adds: web-based review and discussion.
  4. Choose the code review interface.

Exam tip: If Git can do it on a laptop, GitHub doesn't add it; GitHub adds collaboration around it.

Git vs GitHub: Version Control Fundamentals for GitHub Foundations (GH-900) — the lesson that teaches this.

Question 3Understand Git and GitHub basics

A team is sorting its routine tasks into those Git can do on a developer's laptop and those that need a hosting platform. Which TWO cannot be done with Git alone and need a platform such as GitHub? (Select TWO.)

Choose TWO.

  • a
    Seeing which teammate last changed each line of a particular file

    Git does this itself with git blame, which works offline on any clone. GitHub's blame view is a convenience on top.

  • b
    Comparing two versions of a file to see what changed

    Comparing versions is a Git operation (git diff) that runs locally on the repository.

  • c
    Asking a teammate to approve a set of changes in a review Correct

    Requesting and recording an approval happens on a pull request, which is a hosting-platform feature, not part of Git.

  • d
    Combining a teammate's finished feature branch into the main branch

    Merging is a Git operation (git merge). GitHub can merge a pull request, but Git merges branches without it.

  • e
    Assigning a reported bug to a teammate to investigate Correct

    Assigning work is done with issues on GitHub. Git has no concept of bugs or assignees.

The concept

Git's local toolset (diff, blame, merge, log) versus GitHub's collaboration features (pull request reviews, issues, assignees).

Why that’s the answer

The question is which tasks are built into Git itself. GitHub shows blame views, diffs and a merge button, so all five tasks can be done on GitHub, but git blame, git diff and git merge run on any clone without it. Requesting a review approval (pull requests) and assigning a bug (issues) only exist on a hosting platform.

How to reason it out
  1. Note that GitHub can show all five tasks, so the question is which ones Git cannot do.
  2. Recall Git's own commands: diff compares versions, blame shows line authors, merge combines branches.
  3. Recall the platform-only concepts: pull request reviews and issue assignment.
  4. Choose the approval request and the bug assignment.

Exam tip: GitHub shows diffs, blame and merges, but Git does them itself; reviews and issues need the platform.

Git vs GitHub: Version Control Fundamentals for GitHub Foundations (GH-900) — the lesson that teaches this.

Question 4Understand Git and GitHub basics

Git is described as a distributed version control system. What does "distributed" mean here?

Choose one.

  • a
    The files are split across several servers, and each server stores part of them

    Distributed does not mean sharded storage. Each clone holds everything, not a part.

  • b
    Every clone holds a complete copy of the repository, including its full history Correct

    In a distributed system every developer's clone is a full repository with the whole history, not just the latest files.

  • c
    A central server holds the history, and each client downloads the latest files

    That describes a centralised version control system, which Git is not.

  • d
    Each new commit is sent to all collaborators automatically as soon as it is made

    Commits stay in the local repository until someone pushes them; nothing is sent automatically.

The concept

Distributed version control: every clone is a complete repository with the full history.

Why that’s the answer

In centralised systems the history lives on one server and clients work with the latest files. In Git, cloning copies the entire repository, including every commit, so developers can view history, commit and branch locally and then share by pushing and pulling. Commits are not broadcast automatically, and the repository is not split across servers.

How to reason it out
  1. Recall what a Git clone contains: the whole repository and its history.
  2. Contrast with centralised systems, where history stays on the server.
  3. Reject descriptions of sharding or automatic broadcasting.
  4. Choose 'every clone is a complete copy'.

Exam tip: Distributed means every clone has the full history.

Git vs GitHub: Version Control Fundamentals for GitHub Foundations (GH-900) — the lesson that teaches this.

Question 5Understand Git and GitHub basics

A company's central Git server is down for a day. Every developer has an up-to-date clone of the repository. Which TWO things can the developers still do? (Select TWO.)

Choose TWO.

  • a
    Push their new commits so that teammates can see the changes

    Pushing sends commits to the remote, which is unavailable until the server is back.

  • b
    Read the full commit log of the project on their own clone Correct

    The full history is in every clone, so git log works without the server.

  • c
    Create a new branch and commit changes to it on their laptop Correct

    Branching and committing are local operations and need no server.

  • d
    Pull the latest commits that teammates made earlier that day

    Pulling downloads from the remote; with the server down, nothing new can be fetched from it.

  • e
    Clone the repository from the central server onto a newly issued laptop

    Cloning from the central server needs that server. (A clone from a colleague's copy is possible, but not from the server that is down.)

The concept

Because Git is distributed, history, commits and branches work locally; only sharing through a remote needs the server.

Why that’s the answer

A Git clone contains the whole repository, so reading the log, committing and branching all keep working while the server is down. Anything that talks to the remote — push, pull, fetch, clone from that server — has to wait. Once the server returns, developers push their new commits.

How to reason it out
  1. Split the actions into local operations and remote operations.
  2. Local: log, branch, commit. Remote: push, pull, clone from the server.
  3. Keep only the local ones.
  4. Choose reading the log and branching/committing.

Exam tip: Server down? Git still commits, branches and shows history; only sharing waits.

Git vs GitHub: Version Control Fundamentals for GitHub Foundations (GH-900) — the lesson that teaches this.

Question 6Understand Git and GitHub basics

The server that hosted a team's only shared Git repository suffers a disk failure, and the repository is lost. One developer's clone was updated an hour before the failure. What can the team recover from that clone?

Choose one.

  • a
    The latest version of each file, but not the project's earlier commits

    A Git clone is not just a checkout of the latest files; it contains the whole commit history.

  • b
    The commits that this developer made, but not other people's work

    Cloning copies everyone's commits, not just your own; the history is shared.

  • c
    The project's full history, including commits that other developers made Correct

    A clone holds every commit of the repository as of its last update, whoever made them, so it can be pushed to a new server.

  • d
    The commit messages, but not the file contents of earlier project versions

    Each commit stores a full snapshot, so the clone holds earlier file contents as well as messages.

The concept

Every Git clone is a full backup of the repository's history at the time it was last updated.

Why that’s the answer

Because Git is distributed, the developer's clone contains every commit, by every author, up to its last fetch. The team can create a new remote and push from that clone to rebuild the shared repository; only work pushed in the final hour (and not yet fetched by anyone) is missing. The distractors each describe a clone that holds less than a full repository.

How to reason it out
  1. Recall what a clone contains: all commits and their snapshots.
  2. Note that the history includes other people's commits, not just your own.
  3. Note the only gap: anything pushed after the clone's last update.
  4. Choose the full history.

Exam tip: Any up-to-date clone can rebuild a lost Git server: it has the whole history.

Git vs GitHub: Version Control Fundamentals for GitHub Foundations (GH-900) — the lesson that teaches this.

Question 7Understand Git and GitHub basics

In Git, what is a repository?

Choose one.

  • a
    A single saved snapshot of the project's files at one moment in its history

    That is a commit: one snapshot within the repository's history.

  • b
    A project's files together with the complete history of changes made to them Correct

    A repository is the tracked project plus its complete history of commits.

  • c
    A movable pointer that marks one line of development within the project

    That is a branch: a pointer to a commit inside a repository.

  • d
    A copy of a project that is stored on GitHub's servers so others can use it

    A copy hosted on GitHub is a remote repository, but a repository can live anywhere, including only on your own computer.

The concept

A repository is a project's files and their complete version history.

Why that’s the answer

A Git repository is the unit Git manages: the project files plus all the commits that make up their history (stored in the hidden .git directory). A commit is one snapshot inside it, a branch is a pointer to a commit, and a repository on GitHub is simply one place a repository can be hosted.

How to reason it out
  1. Distinguish the container (repository) from what is inside it.
  2. A commit is one snapshot; a branch is a pointer.
  3. A repository need not be on GitHub.
  4. Choose files plus full history.

Exam tip: Repository = files + history. Commit = one snapshot. Branch = pointer.

Git vs GitHub: Version Control Fundamentals for GitHub Foundations (GH-900) — the lesson that teaches this.

Domain 2: Work with GitHub repositories

14% of the GH-900 exam, so 4 of the 25 questions on this page.

Question 8Work with GitHub repositories

A maintainer commits a CODEOWNERS file to .github/ on a feature branch, assigning /docs/ to @acme/docs-team, a visible team with write access. Before that branch is merged, a colleague opens a non-draft pull request from another branch into main that edits /docs/setup.md. No review is requested from the team. What explains this?

Choose one.

  • a
    The CODEOWNERS file has not reached the pull request's base branch Correct

    Correct. Review requests use the CODEOWNERS file on the pull request's base branch. main has no CODEOWNERS file yet, so nobody is requested.

  • b
    The CODEOWNERS file belongs in the repository root, not in the .github folder

    .github/ is a supported location (along with the root and docs/); the folder is not the problem.

  • c
    Code owner requests begin once a branch protection rule requires owner reviews

    Requests are made automatically whenever CODEOWNERS matches. A branch protection rule or ruleset only makes a code owner's approval required before merging.

  • d
    Teams are not valid code owners, so members need listing by username

    Teams can be code owners if they are visible and have write access, which this team has.

The concept

Which CODEOWNERS file applies to a pull request.

Why that’s the answer

Each CODEOWNERS file applies to the branch it is on, and review requests come from the copy on the pull request's base branch. Because the file has not reached main yet, a pull request into main gets no automatic requests. The tempting branch protection answer confuses two things: requesting reviews happens automatically, while requiring a code owner's approval is an optional rule. The location (.github, root or docs) and team ownership are both valid here.

How to reason it out
  1. Note the PR's base branch: main.
  2. Check where the CODEOWNERS file exists: only on an unmerged feature branch.
  3. Recall that requests come from the base branch's CODEOWNERS.
  4. Rule out location, team and branch-protection explanations using the stem's facts.

Exam tip: CODEOWNERS works from the pull request's base branch; protection only makes owner approval required.

GitHub Repository Management: README, CODEOWNERS, Templates and Insights (GH-900) — the lesson that teaches this.

Question 9Work with GitHub repositories

An open source project wants anyone who discovers a vulnerability to know which versions still receive fixes and how to report the problem privately instead of opening a public issue. Which file documents this?

Choose one.

  • a
    SUPPORT.md

    SUPPORT.md directs people to help resources for using the project, not to a vulnerability reporting process.

  • b
    CONTRIBUTING.md

    CONTRIBUTING.md explains how to contribute changes; it is not where GitHub looks for a vulnerability reporting policy.

  • c
    CODE_OF_CONDUCT.md

    A code of conduct sets community behaviour standards and has nothing to do with vulnerability reports.

  • d
    SECURITY.md Correct

    Correct. SECURITY.md is the repository's security policy: supported versions and how to report a vulnerability.

The concept

A repository's security policy is its SECURITY.md file.

Why that’s the answer

GitHub treats SECURITY.md as the security policy: it gives instructions for reporting a vulnerability and usually lists which versions are supported with security updates. GitHub surfaces it from the repository's Security area, so researchers find the private route before filing a public issue.

How to reason it out
  1. Identify the need: supported versions plus a private vulnerability reporting route.
  2. Recall the community health file for security policies.
  3. Reject files about help, contributions or conduct.
  4. Choose SECURITY.md.

Exam tip: Vulnerability reporting instructions and supported versions belong in SECURITY.md.

GitHub Repository Management: README, CODEOWNERS, Templates and Insights (GH-900) — the lesson that teaches this.

Question 10Work with GitHub repositories

Which two statements about a repository's SECURITY.md file are accurate? (Select TWO.)

Choose TWO.

  • a
    It switches on Dependabot alerts for the repository's dependencies

    Dependabot alerts are enabled in security settings; a policy file does not turn any scanning on.

  • b
    It is shown as a link to contributors when they open a pull request

    That describes CONTRIBUTING.md, which GitHub links when people open issues and pull requests.

  • c
    It describes supported versions and how to report a vulnerability Correct

    Correct. That is the purpose of a security policy.

  • d
    It is recognized in the repository root but not in a docs or .github folder

    SECURITY.md can sit in the repository root, the docs folder or the .github folder, and GitHub finds it in any of them.

  • e
    An organization can supply a default one through its public .github repository Correct

    Correct. SECURITY.md is one of the supported default community health files.

The concept

SECURITY.md is documentation, and it can be inherited.

Why that’s the answer

A security policy tells reporters which versions receive security fixes and how to report a vulnerability. It is documentation only: it does not enable Dependabot or any scanning. Like other community health files, an organization or account can provide a default SECURITY.md in a public repository named .github, used by every repository without its own. The file can be placed in the root, docs or .github folder of the repository.

How to reason it out
  1. Recall what a security policy contains.
  2. Separate documentation from settings that enable scanning.
  3. Recall which files can be organization defaults.
  4. Recall the three accepted locations and reject the description that belongs to CONTRIBUTING.md.

Exam tip: SECURITY.md documents how to report; it does not turn on scanning.

GitHub Repository Management: README, CODEOWNERS, Templates and Insights (GH-900) — the lesson that teaches this.

Question 11Work with GitHub repositories

An organization with 200 repositories wants the same code of conduct to appear in every repository that does not have its own, without copying the file into each one. What should an organization owner do?

Choose one.

  • a
    Create a private repository named .github and add the file there

    The defaults repository must be public; a private .github repository is not used for defaults.

  • b
    Add the file to a template repository used for new repositories

    A template copies files only into repositories created from it later; the 200 existing ones would still lack the file.

  • c
    Create a public repository named .github and add the file there Correct

    Correct. Default community health files live in a public repository named .github owned by the organization.

  • d
    Add the file to a public repository named after the organization

    A repository named after an account is how a personal profile README works; it does not supply default files.

The concept

Organization-wide defaults come from a public .github repository.

Why that’s the answer

GitHub lets an organization or personal account provide default community health files, such as CODE_OF_CONDUCT.md, from a repository named .github. That repository must be public. Any repository without its own file of that type uses the default, so existing and future repositories are covered without copying. A template repository only seeds new repositories, and a repository named after a user is for profile READMEs.

How to reason it out
  1. Note the scope: existing repositories, no copying.
  2. Recall where defaults are stored: a repository named .github.
  3. Recall that the defaults repository must be public.
  4. Reject templates, which only help new repositories.

Exam tip: Defaults: a PUBLIC repository named .github; a repo's own file overrides it.

GitHub Repository Management: README, CODEOWNERS, Templates and Insights (GH-900) — the lesson that teaches this.

Domain 3: Collaborate using GitHub

14% of the GH-900 exam, so 4 of the 25 questions on this page.

Question 12Collaborate using GitHub

A repository's default branch is main. A pull request whose description contains "Closes #57" targets a branch named release-2.0 and is merged. Issue 57 stays open. What explains this?

Choose one.

  • a
    Closing keywords are read from commits that reach the default branch, not from the description

    The pull request description is the main place closing keywords are read from. Keywords in commit messages also work, but that does not stop a description keyword from working.

  • b
    Closing keywords are ignored when a merge goes into a branch other than the default Correct

    Correct. Keywords only link and close issues when the pull request targets the default branch; on other branches they are ignored.

  • c
    Closing keywords need a colon straight after them, as in Closes: #57, to be recognised

    A colon is allowed but optional. "Closes #57" is valid syntax.

  • d
    Closing keywords need the issue assigned to the author before the target branch is merged

    Assignees play no part in closing keywords. Anyone's merged pull request can close the issue.

The concept

Closing keywords only work for pull requests that target the default branch.

Why that’s the answer

If a pull request targets any branch other than the default branch, GitHub ignores the closing keywords: no link is created and merging has no effect on the issue. The syntax here is fine (a colon is optional), descriptions are a valid place for keywords, and assignment is irrelevant.

How to reason it out
  1. The keyword and syntax are valid.
  2. Check the target branch: release-2.0 is not the default.
  3. Keywords are ignored for non-default targets, so the issue stays open.

Exam tip: Closing keywords only fire on merges into the default branch.

GitHub Collaboration Tools: Issues, Pull Requests, Discussions, Notifications and Pages (GH-900) — the lesson that teaches this.

Question 13Collaborate using GitHub

A pull request in the octo-org/api repository fixes issue 30 in octo-org/api and issue 12 in octo-org/web. When it is merged into the default branch of octo-org/api, both issues must close. Which description does that?

Choose one.

  • a
    Fixes octo-org/web#12, octo-org/api#30

    Each issue needs its own closing keyword. Only octo-org/web#12 is linked to close; octo-org/api#30 is just referenced.

  • b
    Fixes web#12, fixes #30

    A reference to another repository needs its owner too. web#12 is not the full OWNER/REPOSITORY#NUMBER form.

  • c
    Fixes #12, fixes #30

    #12 refers to issue 12 in octo-org/api itself, so the wrong issue would close and the web issue would stay open.

  • d
    Fixes octo-org/web#12, fixes #30 Correct

    Correct. Each issue gets its own keyword, and the issue in the other repository uses the OWNER/REPOSITORY#NUMBER form.

The concept

Closing several issues, including one in another repository, needs a keyword per issue and the full cross-repository reference.

Why that’s the answer

Two rules combine. First, each issue needs its own keyword ('Resolves #10, resolves #123'), so a comma list after one keyword closes only the first. Second, an issue in another repository is written OWNER/REPOSITORY#NUMBER; a bare #12 means issue 12 in the pull request's own repository, and the repository name alone is not enough.

How to reason it out
  1. Give every issue its own closing keyword.
  2. Refer to the other repository's issue as owner/repo#number.
  3. A bare #number always means the current repository.
  4. Only one option satisfies both rules.

Exam tip: One keyword per issue; other repositories need owner/repo#number.

GitHub Collaboration Tools: Issues, Pull Requests, Discussions, Notifications and Pages (GH-900) — the lesson that teaches this.

Question 14Collaborate using GitHub

A maintainer wants to link an open pull request in octo-org/api to an issue in octo-org/web so the pull request shows in the issue's Development section. The pull request description must not be edited. What should the maintainer do?

Choose one.

  • a
    In the pull request's Development sidebar, select the issue from octo-org/web

    From the pull request side, the issue and pull request must be in the same repository, so the web issue cannot be picked there.

  • b
    In a review comment on the pull request, mention octo-org/web and its issue number

    Mentioning the issue creates a cross-reference on its timeline but does not link it in the Development section.

  • c
    In a project, add both the pull request and the issue as items of the same view

    Sharing a project groups the items for planning; it does not create a pull request to issue link.

  • d
    In the issue's Development sidebar, pick octo-org/api and then the pull request Correct

    Correct. From the issue's Development sidebar you choose a repository and then a pull request or branch, and it can be in a different repository.

The concept

Manual links are made in the Development sidebar, and the two sides have different repository rules.

Why that’s the answer

Without editing the description, closing keywords are out, so the link must be manual, which needs write access. GitHub lets you link from the pull request's Development sidebar only to issues in the same repository, but from the issue's Development sidebar you choose any repository and then a pull request or branch. Mentions only cross-reference and projects only group items.

How to reason it out
  1. Description edits are ruled out, so keywords are out.
  2. Manual linking happens in the Development sidebar.
  3. The PR side only lists same-repository issues.
  4. The issue side can choose another repository's pull request.

Exam tip: Linking across repositories manually? Start from the issue's Development sidebar.

GitHub Collaboration Tools: Issues, Pull Requests, Discussions, Notifications and Pages (GH-900) — the lesson that teaches this.

Question 15Collaborate using GitHub

A maintainer wants contributors to see a choice of structured bug report and feature request templates when they open a new issue. Where should the template files be committed?

Choose one.

  • a
    In the .github/workflows folder on the default branch

    The workflows folder holds GitHub Actions workflow files, not issue templates.

  • b
    In a CONTRIBUTING.md file that the New issue page links to

    GitHub links CONTRIBUTING.md when people open an issue, but the file only gives guidelines; it does not offer templates to choose from.

  • c
    In the repository wiki as one page per issue template type

    Wiki pages are documentation. GitHub does not read issue templates from the wiki.

  • d
    In the .github/ISSUE_TEMPLATE folder on the default branch Correct

    Correct. Issue templates live in .github/ISSUE_TEMPLATE and take effect from the default branch.

The concept

Issue templates are files in the .github/ISSUE_TEMPLATE folder.

Why that’s the answer

When a repository has files in .github/ISSUE_TEMPLATE on its default branch, the New issue page shows a template chooser. The workflows folder is for Actions, CONTRIBUTING.md offers guidance rather than a form, and the wiki is not read for templates.

How to reason it out
  1. Templates are repository files, not wiki pages or docs.
  2. The folder is .github/ISSUE_TEMPLATE.
  3. They must be on the default branch to appear.

Exam tip: Issue templates: .github/ISSUE_TEMPLATE on the default branch.

GitHub Collaboration Tools: Issues, Pull Requests, Discussions, Notifications and Pages (GH-900) — the lesson that teaches this.

Domain 4: Apply modern development practices

14% of the GH-900 exam, so 3 of the 25 questions on this page.

Question 16Apply modern development practices

An organization worries that Copilot might offer suggestions that match code in public GitHub repositories. What can its Copilot policy do with such matching suggestions?

Choose one.

  • a
    Rewrite them on the fly so that they no longer match the public code

    Copilot does not rewrite a match to disguise it. The policy decides whether matching suggestions are blocked or shown with references.

  • b
    Block them, or show them with details of the matching public code Correct

    Correct. Copilot checks suggestions against public code on GitHub; depending on the policy, matches are blocked or shown with information about the matching code.

  • c
    Hold them for an organization owner to approve before anyone sees them

    There is no approval queue for suggestions. Matching suggestions are blocked or shown with references, immediately.

  • d
    Allow them when the matching repository has a permissive license

    The policy does not filter by the license of the matching repository; it blocks or annotates matches, and the developer reviews the references.

The concept

Copilot can check suggestions against public code on GitHub; a policy blocks matching suggestions or shows them with references to the matching code.

Why that’s the answer

The public code policy has two outcomes: block suggestions that match public code, or allow them with information about where the matching code appears so the developer can review it. Copilot does not rewrite matches, queue them for approval or filter by license. Only public repositories on GitHub.com are searched; private code and code hosted elsewhere are not part of the check.

How to reason it out
  1. The concern is suggestions that duplicate public code.
  2. Copilot compares suggestions with public repositories on GitHub.
  3. The policy either blocks the match or shows it with references.
  4. Reject invented behaviours such as rewriting or approval queues.

Exam tip: Public code matches: block them or show them with references, as the policy says.

GitHub Actions, Copilot, Codespaces and github.dev: Automation and AI Tools (GH-900) — the lesson that teaches this.

Question 17Apply modern development practices

In VS Code, a developer asks Copilot Chat to add input validation throughout a project. She wants Copilot to decide which files to change, edit them, run the test command and fix any failures by itself. Which Copilot Chat mode fits?

Choose one.

  • a
    Agent mode Correct

    Correct. Agent mode works autonomously on a task, using tools to read files, edit code and run commands, and it corrects itself when something fails.

  • b
    Ask mode

    Ask mode answers questions and offers code suggestions in the chat; it does not carry out a multi-step task by editing files and running commands.

  • c
    Plan mode

    Plan mode produces a detailed implementation plan. It helps you agree the approach, but the requirement is for Copilot to make and test the changes.

  • d
    Inline chat

    Inline chat edits the code you select in the editor, but it does not choose files across the project, run terminal commands and iterate on test failures on its own.

The concept

Copilot agent mode in the IDE completes a task autonomously: it reads files, edits code, runs commands and corrects itself.

Why that’s the answer

The developer wants Copilot to act, not just answer: choose files, edit, run tests and react to failures. That autonomous loop of reading, editing and running commands is agent mode. Ask mode answers questions, plan mode writes an implementation plan, and inline chat changes a selection you point it at without running and iterating on commands.

How to reason it out
  1. List what Copilot must do: pick files, edit, run tests, fix failures.
  2. Running commands and iterating means autonomous tool use.
  3. That is agent mode.
  4. Ask answers, plan plans, inline chat edits a selection.

Exam tip: Want Copilot to do the task end to end in your editor, running commands as it goes? Agent mode.

GitHub Actions, Copilot, Codespaces and github.dev: Automation and AI Tools (GH-900) — the lesson that teaches this.

Question 18Apply modern development practices

What distinguishes Copilot agent mode in an IDE from Copilot ask mode?

Choose one.

  • a
    Agent mode reads files, edits code and runs commands to complete a task Correct

    Correct. Agent mode uses tools in your IDE to read files, edit code and run commands, working through the task and correcting itself.

  • b
    Agent mode answers questions about the code and leaves the files unchanged

    That describes ask mode. Agent mode goes further and changes files and runs commands to finish a task.

  • c
    Agent mode writes an implementation plan for review before code is written

    That describes plan mode. Agent mode carries out the work rather than only planning it.

  • d
    Agent mode runs in a cloud environment and delivers its work as a pull request

    That describes Copilot cloud agent. Agent mode runs in your local IDE session, with you watching the changes.

The concept

Ask mode answers; plan mode plans; agent mode acts in your IDE; cloud agent acts in the background on GitHub.

Why that’s the answer

Each Copilot surface has a distinct job. Ask mode answers questions and suggests code. Plan mode writes an implementation plan. Agent mode autonomously completes a task inside your IDE by reading files, editing code and running commands. Copilot cloud agent does similar work in an ephemeral cloud environment and delivers a pull request. The distractors describe the other three.

How to reason it out
  1. Match each description to a Copilot surface.
  2. Answers only: ask mode. Plans only: plan mode.
  3. Cloud environment plus pull request: cloud agent.
  4. Edits and commands in your IDE: agent mode.

Exam tip: Agent mode = autonomous work in your IDE; cloud agent = autonomous work on GitHub in the background.

GitHub Actions, Copilot, Codespaces and github.dev: Automation and AI Tools (GH-900) — the lesson that teaches this.

Domain 5: Manage projects with GitHub

8% of the GH-900 exam, so 2 of the 25 questions on this page.

Question 19Manage projects with GitHub

An open-source maintainer wants a volunteer to sort incoming issues by applying and removing labels. The volunteer must not be able to push code. Which repository role is the least access that allows this?

Choose one.

  • a
    The Read role

    Read lets the volunteer view and comment, but not apply or remove labels on issues.

  • b
    The Write role

    Write can apply labels, but it also allows pushing code, which breaks the stated constraint.

  • c
    The Triage role Correct

    Correct. Triage lets a person apply and dismiss labels and manage issues and pull requests without write access to the code.

  • d
    The Maintain role

    Maintain includes write access plus some settings, far more than labelling needs and it can push code.

The concept

Repository roles: Read, Triage, Write, Maintain and Admin.

Why that’s the answer

Applying and dismissing labels on issues, pull requests and discussions needs triage access. Creating, editing or deleting the labels themselves needs write access. Write and Maintain would also work for labelling but allow pushing code, so the least-access role is Triage.

How to reason it out
  1. Name the action: apply and remove existing labels.
  2. Recall that applying labels needs triage access.
  3. Note the constraint: no code push.
  4. Pick the lowest role that meets both: Triage.

Exam tip: Triage applies labels; write creates them (and can push code).

GitHub Projects, Labels, Milestones and Insights: Project Tracking (GH-900) — the lesson that teaches this.

Question 20Manage projects with GitHub

A maintainer wants first-time contributors to find small, approachable tasks on the repository's contribute page. What should the maintainer do?

Choose one.

  • a
    Apply the help wanted label and leave them unassigned

    help wanted signals that maintainers want help, but it does not mark a task as suitable for a first-time contributor or feed the contribute page.

  • b
    Apply the good first issue label to those issues Correct

    Correct. Issues with the good first issue label populate the repository's contribute page for first-time contributors.

  • c
    Pin those issues at the top of the repository's Issues tab

    Pinning raises visibility in the issue list, but it does not mark the work as beginner-friendly or place it on the contribute page.

  • d
    Add those issues to a milestone named Newcomers

    A milestone groups work toward a due date. Its name does not tell GitHub to list the issues for newcomers.

The concept

New repositories include default labels such as bug, documentation, enhancement, good first issue and help wanted.

Why that’s the answer

GitHub uses the good first issue label to fill the repository's contribute page, which is where newcomers look for approachable work. help wanted is the tempting near-twin: it asks for help but makes no promise that the task suits a beginner. Pinning and milestones change visibility or grouping, not the contribute page.

How to reason it out
  1. Note the audience: first-time contributors.
  2. Recall which default label feeds the contribute page.
  3. Separate 'beginner-friendly' from 'help needed'.
  4. Choose good first issue.

Exam tip: good first issue is for newcomers; help wanted is for any help.

GitHub Projects, Labels, Milestones and Insights: Project Tracking (GH-900) — the lesson that teaches this.

Domain 6: Understand privacy, security, and administration

14% of the GH-900 exam, so 3 of the 25 questions on this page.

Question 21Understand privacy, security, and administration

A project manager needs to edit an organization repository's description and topics and configure its pull request merge options, but must not manage access, branch protection or delete the repository. Which role fits?

Choose one.

  • a
    Admin

    Admin would work but also allows managing access, branch protection, visibility and deletion, which the manager must not have.

  • b
    Write

    Write can push and merge but cannot change the description, topics or repository settings.

  • c
    Maintain Correct

    Correct. Maintain adds repository management such as description, topics and merge options, without access, protection or destructive actions.

  • d
    Organization owner

    An owner has admin access to every repository and full control of the organization, far beyond what is allowed here.

The concept

Maintain is for people who manage a repository without sensitive or destructive actions.

Why that’s the answer

Maintain builds on Write and adds settings such as the description, topics, wikis, merge options, Pages publishing and interaction limits. It deliberately excludes access management, branch protection and rulesets, visibility changes, webhooks and deploy keys, and deleting, archiving or transferring the repository, all of which belong to Admin. Write cannot touch the repository's settings at all.

How to reason it out
  1. List the needed actions: description, topics, merge options.
  2. List the forbidden ones: access, protection, deletion.
  3. Recall that Maintain sits between Write and Admin.
  4. Choose Maintain.

Exam tip: Maintain manages the repository; Admin adds access, protection, visibility and destructive actions.

GitHub Security and Access Management: 2FA, Passkeys, Roles and Branch Protection (GH-900) — the lesson that teaches this.

Question 22Understand privacy, security, and administration

A team lead holds the Maintain role on an organization repository. She tries to add a rule requiring two approving reviews before merging into main, but cannot find a way to save it. What explains this?

Choose one.

  • a
    Required reviews need a CODEOWNERS file first

    Required approvals work without a CODEOWNERS file; that file matters only for requiring code owner review.

  • b
    Branch protection needs the Write role instead

    Write has fewer powers than Maintain; neither can manage branch protection.

  • c
    Branch protection rules need the Admin role Correct

    Correct. Managing branch protection and rulesets is an Admin capability; Maintain does not include it.

  • d
    Protecting main needs an organization owner

    Organization owners can do it, but so can anyone with the Admin role on the repository.

The concept

Branch protection and rulesets are managed by repository administrators.

Why that’s the answer

Maintain is meant for managing a repository without sensitive or destructive actions, and GitHub treats protection of branches as sensitive: only the Admin role (and organization owners, who have admin on every repository) can create or change branch protection rules and rulesets. A CODEOWNERS file is needed only for the separate code owner review option, and Write sits below Maintain.

How to reason it out
  1. Note the role held: Maintain.
  2. Recall what Maintain excludes: access, protection, visibility, deletion.
  3. Conclude the setting needs Admin.
  4. Reject the CODEOWNERS and Write explanations.

Exam tip: Only repository admins (and organization owners) manage branch protection and rulesets.

GitHub Security and Access Management: 2FA, Passkeys, Roles and Branch Protection (GH-900) — the lesson that teaches this.

Question 23Understand privacy, security, and administration

A developer owns a private repository in her personal account. She wants an auditor to view the code but not push to it, and finds that collaborators can only be given write access. What should she do?

Choose one.

  • a
    Transfer the repository to an organization and grant Read Correct

    Correct. Personal repositories have only owner and collaborator levels; an organization offers Read and the other roles.

  • b
    Add the auditor as a collaborator and choose the Triage role

    Personal-account repositories have no Triage or other granular roles; collaborators get write access.

  • c
    Make the auditor a code owner with view permission

    Code owner is a review responsibility, not a permission level, and needs write access to the repository.

  • d
    Protect main so the collaborator's pushes are blocked

    Branch protection would limit one branch but the auditor could still push other branches; it does not create read-only access.

The concept

A personal-account repository has an owner and collaborators; granular roles need an organization.

Why that’s the answer

In a private repository owned by a personal account, the owner can only invite collaborators, and collaborators can push. GitHub's own guidance is to transfer the repository to an organization, or create it there, when finer access is needed: organization repositories offer Read, Triage, Write, Maintain and Admin. Triage does not exist for personal repositories, code owners are reviewers who need write access, and protecting one branch leaves the rest writable.

How to reason it out
  1. Note the owner type: a personal account.
  2. Recall personal repositories have only owner and collaborator levels.
  3. Recall that granular roles exist in organizations.
  4. Choose transferring the repository to an organization.

Exam tip: Need read-only or other granular roles? Move the repository into an organization.

GitHub Security and Access Management: 2FA, Passkeys, Roles and Branch Protection (GH-900) — the lesson that teaches this.

Domain 7: Explore the GitHub community

8% of the GH-900 exam, so 2 of the 25 questions on this page.

Question 24Explore the GitHub community

A student wants new public repositories and discussions from a large open source organization to appear on her personal dashboard. She does not want to become a member of the organization. What should she do?

Choose one.

  • a
    Ask to join the organization as a member

    The student does not want membership, and membership is about access, not a dashboard feed.

  • b
    Follow the organization on GitHub Correct

    Correct. Following an organization shows its public activity, such as new repositories and discussions, on your personal dashboard.

  • c
    Star the organization's .github repository

    Starring one repository bookmarks it; it does not bring the organization's new repositories or discussions into your feed.

  • d
    Watch the organization's profile repository

    Watching a single repository sends notifications about that repository only, not about the organization's other activity.

The concept

You can follow organizations, as well as users, to see their public activity.

Why that’s the answer

Following an organization puts its public activity, such as new discussions, sponsorships and repositories, on your personal dashboard, and you can unfollow at any time. No membership is needed. Starring or watching one repository, even the organization's .github or profile repository, only covers that repository. GitHub labels following organizations as a public preview feature, so details may change.

How to reason it out
  1. Note the subject: an organization's activity, not one repository.
  2. Note the constraint: no membership.
  3. Recall that organizations can be followed like users.
  4. Reject options scoped to a single repository.

Exam tip: Follow an organization to see its public activity without joining it.

Open Source on GitHub: Sponsors, Marketplace, InnerSource, Forks and Discovery (GH-900) — the lesson that teaches this.

Question 25Explore the GitHub community

A team lead wants a notification for every new issue and pull request in one repository her team depends on. Separately, she wants to see a colleague's public activity across GitHub on her dashboard. Which combination fits both needs?

Choose one.

  • a
    Watch the repository and star the colleague's repositories

    Watching is right, but starring the colleague's repositories bookmarks them and does not show the colleague's activity on the dashboard.

  • b
    Star the repository and follow the colleague

    Following the colleague is right, but starring a repository bookmarks it and sends no issue or pull request notifications.

  • c
    Star the repository and star the colleague's repositories

    Starring only bookmarks repositories: it sends no notifications and does not show the colleague's activity on the dashboard.

  • d
    Watch the repository and follow the colleague Correct

    Correct. Watching all activity on a repository sends notifications for its issues and pull requests; following a person shows their public activity on your dashboard.

The concept

Watching, following and starring do different jobs on GitHub.

Why that’s the answer

Watching is set per repository and controls notifications: watching all activity notifies you about new issues, pull requests and more. Following is for users and organizations and puts their public activity on your personal dashboard. Starring bookmarks a repository and shows appreciation but sends no notifications and no activity feed. So the repository need calls for watching and the colleague need calls for following; any option that uses starring for either need fails it.

How to reason it out
  1. Split the request into its two needs.
  2. Map repository notifications to watching.
  3. Map a person's activity feed to following.
  4. Reject any option that uses starring for either need.

Exam tip: Watch repositories for notifications, follow people for their activity, star to bookmark.

Open Source on GitHub: Sponsors, Marketplace, InnerSource, Forks and Discovery (GH-900) — the lesson that teaches this.

Keep going with GH-900

GH-900 practice by domain

GH-900 sample questions: your questions

No. Real exam questions are confidential. These are original questions written to the skills in the official GH-900 exam guide, so they test the same knowledge in the same style without being copies of the exam.

Source

The domains and weights on this page come from the official GH-900 exam guide.