Microsoft certification · Exam GH-900

GH-900 Mock Exam Page 3

GitHub Foundations

Free GH-900 mock exam questions 21–30, each with the answer and an explanation.

20 questions · 30 minutes · free, no sign-up

Free GH-900 questions

21–30 of 36 free
Question 21 Choose 1
When using Organizations, GitHub Teams is better than GitHub Free because it offers:
Show answerHide answer

Correct answer: B Authentication with SAML single sign-on and increased GitHub Actions minutes.

Explanation

Explanation:
This question requires distinguishing between the features of GitHub Free and the paid GitHub Team plan, specifically in the context of organizations. The Team plan introduces significant administrative and productivity features absent from the free tier, notably enterprise-grade authentication and more resources for automation.

Correct Option:

B. Authentication with SAML single sign-on and increased GitHub Actions minutes
This is a core differentiator. GitHub Free for organizations does not include SAML SSO, a critical security feature for enterprise management. The Team plan adds SAML SSO and provides more included Actions minutes per month compared to the Free tier.

Incorrect Option(s):

A. Advanced tools and insights in private repositories
Both GitHub Free and Team offer unlimited private repositories with basic tools. The "Advanced" tools and insights (like code owners, required reviewers, draft PRs) are indeed part of GitHub Team, but the listed "authentication with SAML" (option B) is a more definitive and exclusive enterprise feature.

C. Expanded storage and priority support
"Expanded storage" and "priority support" are features of the higher-tier GitHub Enterprise plans (Cloud or Server), not the GitHub Team plan. This option describes a more advanced offering.

D. Increased GitHub Actions minutes and additional GitHub Packages storage
While GitHub Team does include increased Actions minutes, "additional GitHub Packages storage" is not a primary advertised differentiator for Team vs. Free. The most distinctive, non-negotiable upgrade for organizations is SAML SSO, which is exclusive to paid plans.

Reference:
GitHub's official pricing page comparing "Free for organizations" and "Team." The comparison matrix explicitly lists "SAML single sign-on" and "3,000 Actions minutes/month" as features of the Team plan, which are not included in the Free tier.
Question 22 Choose 2
Which of the following are advantages of saved replies?

(Each correct answer presents part of the solution. Choose two.)
Show answerHide answer

Correct answer: A, C Saved replies are tied to a GitHub user's personal account. Saved replies allow you to create a reusable response to issues and pull requests.

Explanation

Explanation:
This question tests the practical application and scope of GitHub's Saved Replies feature. Saved Replies are a personal productivity tool that allows users to quickly insert common text snippets when commenting on issues or pull requests. They are designed for individual efficiency, not for organization-wide policy or automated notifications.

Correct Option:

A. Saved replies are tied to a GitHub user's personal account.
This is a key characteristic. Saved replies are a user-specific feature stored in an individual's account settings. They are not shared across teams or organizations by default and travel with the user.

C. Saved replies allow you to create a reusable response to issues and pull requests.
This is the primary function and advantage. They enable users to define and store template responses (e.g., common troubleshooting steps, welcome messages) and insert them quickly into comment fields, saving time and ensuring consistency.

Incorrect Option(s):

B. Saved replies are allocated at the enterprise level for all users.
False. There is no "enterprise-level" allocation or management for saved replies. They are strictly a personal, user-controlled feature. Enterprise-wide templating would require other tools like issue forms or organization-owned content.

D. Saved replies will send auto notifications when a user is tagged to an issue.
False. Saved replies are inert text templates. They have no automation or notification logic. Inserting a saved reply is a manual action, and any @mention within the template text behaves like a normal mention only when the comment is submitted.

Reference:
GitHub Docs, "About saved replies," which states: "Saved replies are reusable responses that you can add to issues and pull requests... You can create, edit, and delete saved replies in your personal account settings." This confirms both correct points.
Question 23 Choose 3
What are some scenarios that can automatically subscribe you to conversations on GitHub?

(Each answer presents a complete solution. Choose three.)
Show answerHide answer

Correct answer: C, D, E Opening a pull request or issueCommenting on a threadBeing assigned to an issue or pull request

Explanation

Explanation:
This question tests knowledge of GitHub's automatic subscription rules. Subscriptions determine which conversations (issues, pull requests) you receive notifications for. GitHub automatically subscribes you when you have a direct participatory role in a thread (author, commenter, assignee) or when you have a certain level of ownership over the repository where the conversation occurs.

Correct Option:

C. Opening a pull request or issue:
You are automatically subscribed to any issue or pull request you create, as you are the author and primary stakeholder in that conversation.

D. Commenting on a thread:
When you comment on an issue, pull request, or their associated reviews, you are automatically subscribed to receive future updates on that specific thread.

E. Being assigned to an issue or pull request:
Assignment indicates direct responsibility for a task. When assigned, you are automatically subscribed to ensure you are notified of all follow-up activity.

Incorrect Option(s):

A. Pushing a commit to the default branch:
Simply pushing a commit does not automatically subscribe you to unrelated issues or pull requests. You would only be subscribed if the commit is pushed to a branch associated with a specific open pull request you are already involved in.

B. Being added as a repo admin:
Gaining the "Admin" role on a repository does not automatically subscribe you to all existing conversations in that repo. You will be automatically subscribed to new conversations created after your role change (if your watching settings are set to "All Activity"), but not retroactively to old ones.

Reference:
GitHub Docs, "About notifications," specifically the sections on subscriptions and "Reasons you're receiving notifications." It lists: "You're participating in an issue or pull request... You opened the issue or pull request... You were @mentioned... You're subscribed to the issue or pull request (which occurs when you comment, are assigned, etc.)." This confirms C, D, and E as triggers.
Question 24 Choose 1
An employee needs to find all issues within organization “Avocado" containing text "404 error" and a "guacamole" label. Which of the following steps would be best to search for these results?
Show answerHide answer

Correct answer: A Enter query org:Avocado is:issue label:guacamole "404 error" in the search bar.

Explanation

Explanation:
This question tests the most efficient method for performing a precise, cross-repository search using GitHub's search syntax. The requirement is to find all issues across the entire organization matching specific text and a label. The global search bar with qualifying search qualifiers (org:, is:issue, label:) is the correct tool for this organization-wide query.

Correct Option:

A. Enter query org:Avocado is:issue label:guacamole "404 error" in the search bar.
This is the most direct and comprehensive method. Using org: scopes the search to the entire Avocado organization. is:issue filters for issues only. label:guacamole restricts to that specific label, and the quoted phrase "404 error" searches for that exact text. This single query yields all matching results from any repository in the org.

Incorrect Option(s):

B. Go to "Avocado" organization. Select Issues under a repository. Filter issues with a "guacamole" label.
This method would only search within a single, specific repository you select, not across the entire Avocado organization. It does not satisfy the requirement to search "all issues within organization 'Avocado'".

C. Enter query org:Avocado label:guacamole "404 error" in the search bar. Select "Issues" in the Filter by section.
While close, this method is less precise and relies on a UI filter after the search. The initial query is missing the crucial is:issue qualifier, so results would initially include code, PRs, etc. Adding the "Issues" filter afterward works, but option A is the best practice as it's a single, complete search string.

D. Go to the Avocado organization settings. Select Repository defaults under Repository. Scroll to Repository labels and select the 'guacamole' label.
This path is for managing default labels for new repositories in the organization, not for searching for existing issues. It does not perform a search function at all.

Reference:
GitHub Docs, "Searching on GitHub," specifically the sections on searching issues and using qualifiers like org:, is:issue, and label:. The documentation demonstrates constructing such queries in the search bar for organization-wide searches.
Question 25 Choose 1
After 30 minutes of inactivity, a GitHub Codespace will:
Show answerHide answer

Correct answer: D Time out

Explanation

Explanation:
This question tests the default timeout behavior for inactive GitHub Codespaces to manage cloud resource usage. Codespaces are ephemeral development environments, and to prevent unnecessary costs, they are automatically suspended after a period of inactivity, but not immediately deleted.

Correct Option:

D. Time out
By default, a Codespace will automatically time out and stop after 30 minutes of inactivity (no editor interaction or terminal commands). The environment is suspended, preserving all files and state, but the virtual machine is deallocated. The user can manually restart it later.

Incorrect Option(s):

A. Be deleted
Deletion is a permanent, manual action (Delete from the Codespaces list). Timeout leads to stopping, not deletion. Codespaces have a separate, configurable retention period (default 30 days) after being stopped before they are auto-deleted.

B. Commit changes
A timeout does not trigger a Git commit. Users must manually commit and push their changes. Uncommitted work in a stopped Codespace is preserved locally until the next start, but it is not saved to the repository.

C. Restart
"Restart" implies the environment reboots and becomes active again. The opposite happens—it becomes inactive (stops). A user must explicitly restart it. An automatic restart would defeat the purpose of saving resources.

Reference:
GitHub Docs, "Configuring automatic deletion of your codespaces" and "Deep dive into GitHub Codespaces," which explain the inactivity timeout settings: "By default, a codespace will timeout after 30 minutes of inactivity." This timeout results in the codespace stopping.
Question 26 Choose 1
Which of the following best describes GitHub Copilot?
Show answerHide answer

Correct answer: C An AI pair programmer that offers autocomplete-style suggestions

Explanation

Explanation:
This question tests the official definition and marketing of GitHub Copilot. It is an AI-powered developer tool integrated directly into the editor. Its core functionality is to assist developers by suggesting lines or blocks of code in real-time, acting as an "AI pair programmer" rather than a replacement or a simple search tool.

Correct Option:

C. An AI pair programmer that offers autocomplete-style suggestions
This is GitHub's own description of Copilot. It is an AI model trained on public code, integrated into IDEs like VS Code, JetBrains, and Visual Studio, which provides context-aware code completions, function suggestions, and can even generate code from natural language comments.

Incorrect Option(s):

A. A Visual Studio Code extension for developing AI solutions
While Copilot is available as a VS Code extension, this description is too narrow and incorrect in purpose. It is not a tool for developing AI solutions; it is an AI solution designed to assist with general software development across many languages and frameworks.

B. An AI tool designed to replace software developers
False. GitHub explicitly positions Copilot as an assistant or "pair programmer" meant to enhance productivity and reduce boilerplate, not to replace developers. It augments human judgment and creativity.

D. An advanced search tool to intelligently reuse existing code in your projects
This describes a code search or snippet management tool. While Copilot's suggestions may be inspired by existing code patterns, it does not search and copy verbatim; it generates new code syntheses tailored to the context. Its primary interface is autocomplete, not a search result list.

Reference:
GitHub Copilot's official website and documentation, which states: "GitHub Copilot is an AI pair programmer that helps you write code faster and with less work." This is the definitive description.
Question 27 Choose 3
From the Organization settings, which restrictions can organization owners place on GitHub Actions usage? (Each answer presents a complete solution. Choose three.)
Show answerHide answer

Correct answer: A, C, D Allow actions that use self-hosted runners.Allow specified actions.Allow actions by Marketplace verified creators.

Explanation

Explanation:
This question tests knowledge of the specific policy controls available to organization owners for governing GitHub Actions usage. These settings are found in Organization Settings > Actions > General, under the "Policies" section, and are designed to manage security and compliance by restricting which actions can be run.

Correct Option:

A. Allow actions that use self-hosted runners.
This is a discrete policy setting. Organization owners can disable actions from running on self-hosted runners if they want to restrict workflows to GitHub-hosted runners only, often for compliance or security reasons.

C. Allow specified actions.
This is the core "Allow select actions" policy. It restricts workflows to using only a curated list of actions explicitly specified by the admin (from GitHub-owned, Marketplace verified, or custom actions), blocking all others.

D. Allow actions by Marketplace verified creators.
This is part of the tiered restriction options. The "Allow actions created by GitHub and verified creators" policy is less restrictive than "specified actions" but more restrictive than allowing all actions, providing a balance of security and flexibility.

Incorrect Option(s):

B. Allow an action to be run from a Codespace.
There is no specific organization-wide setting to allow/disable Actions from running from a Codespace. Codespaces can execute workflows if they have the necessary permissions, but the control is over which actions can run, not where the workflow is triggered from in this context.

E. Allow actions created by GitHub.
While this is a valid, highly restrictive policy option ("Allow actions created by GitHub"), the question asks for three correct choices from the list. The confirmed correct trio from available documentation is A, C, D. Option E is technically a possible setting but not listed as one of the correct three here, as the standard options are: 1) Allow all, 2) Allow actions by GitHub and verified creators, 3) Allow specified actions, plus the toggle for self-hosted runners.

Reference:
GitHub Docs, "Managing GitHub Actions settings for a repository or organization," specifically the "Policies" section. It lists the configurable policies as: "Allow all actions," "Allow actions created by GitHub and verified creators," "Allow specified actions," and the separate toggle "Allow actions that use self-hosted runners."
Question 28 Choose 1
What are the defining features of Git?
Show answerHide answer

Correct answer: A Distributed version control, open source software, and being designed for handling projects of any size with efficiency

Explanation

Explanation:
This question tests the core, defining attributes of Git as a version control system, distinct from centralized systems or hosting platforms. Git's architecture is fundamentally distributed, its development model is open source, and it is renowned for its performance and scalability, which are its key defining features.

Correct Option:

A. Distributed version control, open source software, and being designed for handling projects of any size with efficiency
This accurately captures Git's essence. It is a Distributed VCS where every clone is a full repository. It is open source software initially created by Linus Torvalds. Its design, with object storage and delta compression, makes it highly efficient and scalable for projects from small to massive (like the Linux kernel).

Incorrect Option(s):

B. Sequential version control, cloud-based hosting service, and being designed for collaboration on large projects
Incorrect. Git is not "sequential" (it's directed acyclic graph-based) and is not inherently a "cloud-based hosting service" (that describes GitHub, a platform built on Git). While it enables collaboration, this description conflates Git with services built around it.

C. Low-cost local branching, convenient staging areas, multiple workflows, and being designed for managing small projects
The first three items are correct features of Git. However, the final clause ("designed for managing small projects") is false. Git was explicitly designed for the large-scale development of the Linux kernel and excels at handling massive projects.

D. Centralized version control, proprietary software, and being designed for small projects
This is the opposite of Git on all counts. Git is distributed, open source, and designed for large, efficient projects.

Reference:
The official Git documentation and its foundational design principles. The Git website states it is a "free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency." This matches option A exactly.
Question 29 Choose 1
What is the primary purpose of creating a new branch in the GitHub flow?
Show answerHide answer

Correct answer: C To experiment with new features or fixes

Explanation

Explanation:
This question tests the central role of branching within the GitHub Flow workflow. In this lightweight model, the main branch (main) represents the stable, deployable state. New branches are created to isolate and develop changes, enabling safe experimentation without disrupting the stable line of development.

Correct Option:
C. To experiment with new features or fixes
This is the primary purpose. A new branch provides an isolated environment for developing a feature, fixing a bug, or making any change. This isolation allows work to progress safely, be tested, and reviewed via a pull request before it is integrated back into the main branch.

Incorrect Option(s):

A. To create a backup of the main branch
This is not the purpose of branching. Creating a branch does not serve as a backup; the entire repository (including all branches) is the backup. Git's distributed nature means every clone is a full backup.

B. To capture information about an issue
Information about an issue is captured in the issue tracker (title, description, comments). While you might create a branch named after an issue, the branch itself is for implementing the solution, not capturing the problem's information.

D. To incorporate changes from a review
Changes from a review are incorporated by committing to the existing feature branch that is the subject of the pull request. You do not create a new branch to incorporate review feedback; you update the same branch.

Reference:
GitHub Docs, "GitHub flow," which states: "Create a branch... When you're working on a project, you're going to have a bunch of different features or ideas in progress at any given time... Branches exist to help you manage this workflow." This frames branching as the mechanism for developing ideas.
Question 30 Choose 1
From the list of projects for an organization, how can a user identify a GitHub Projects template?
Show answerHide answer

Correct answer: C Select the Templates tab.

Explanation

Explanation:
This question tests the practical method for finding pre-built templates within the GitHub Projects interface at the organization level. Templates are useful starting points for teams, and GitHub provides a dedicated UI section to browse and select them, separate from custom or existing projects.

Correct Option:

C. Select the Templates tab.
When viewing the list of projects for an organization, there is a dedicated "Templates" tab at the top of the projects list page. Selecting this tab filters the view to show only available project templates (like "Basic kanban", "Bug triage", "Team planning"), which can then be used to create a new project.

Incorrect Option(s):

A. Check the "show template" checkbox.
There is no such checkbox in the organization's projects list interface. Visibility of templates is controlled by the dedicated "Templates" tab, not a checkbox filter.

B. Use the "is:" filter in the search text box.
While you can filter issues and PRs with is: qualifiers, this search syntax is not applicable for filtering the organization's project list to show only templates within the Projects UI.

D. View the contents in the .github/projects folder.
The .github/projects folder is not a standard or recognized location for storing GitHub Projects templates. Organization-level project templates are managed and discovered through the GitHub web interface's Templates tab, not via repository folders.

Reference:
GitHub Docs, "Creating a project," which states: "You can create a new project from a template... On GitHub.com, navigate to your organization... In the top right, click New project. Click New project again. At the top of the page, click Templates to see available templates." This confirms the Templates tab as the entry point.
Full mock exam

Sit the GH-900 exam before exam day

Full-length mocks with the same number of questions and the same time limit as the real GH-900 exam. Every attempt draws a new set of questions from the full bank, so you can keep going until you pass comfortably.

Get full GH-900 mock exam
  • —questions per mock
  • —time limit
  • 123questions in the bank
  • Newmock on every attempt