Microsoft certification · Exam GH-900

GH-900 Mock Exam Page 2

GitHub Foundations

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

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

Free GH-900 questions

11–20 of 36 free
Question 11 Choose 1
The difference between GitHub Desktop and github.com is that Desktop:
Show answerHide answer

Correct answer: D Offers a graphical user interface.

Explanation

Explanation:
This question tests the core distinction between the two main GitHub interfaces: github.com (the web platform) and GitHub Desktop (a dedicated local client). Both are official GitHub products, but they serve different primary purposes and have different form factors. The correct answer must be a true, exclusive differentiator.

Correct Option:

D. Offers a graphical user interface.
GitHub Desktop is a dedicated, standalone GUI application for managing Git repositories. While github.com also has a web-based GUI, the key distinction is that Desktop provides a rich, local desktop application specifically optimized for core Git workflows like staging, committing, branching, and history visualization.

Incorrect Option(s):

A. Is a standalone software application.
This is true, but it's a description of its form factor, not its fundamental difference from github.com. Both are "applications" (one desktop, one web). The core difference is in their purpose and capabilities, not merely that one is installed.

B. Enables integration with office suite applications.
False. GitHub Desktop does not have native integrations with office software. Managing documents in a repo is handled at the file system/Git level, not through special integrations in the client.

C. Is only available on Windows operating systems.
False. GitHub Desktop is cross-platform and is available for Windows, macOS, and Linux.

E. Is a self-hosted version of GitHub.
False. This describes GitHub Enterprise Server, a completely different product. GitHub Desktop is a client for interacting with repositories hosted on github.com or GitHub Enterprise.

Reference:
GitHub Docs, "Getting started with GitHub Desktop," which introduces it as "an application that enables you to interact with GitHub using a GUI instead of the command line or a web browser." This highlights its role as a dedicated GUI client.
Question 12 Choose 1
Which of the following is the best GitHub feature for long-form documentation for a project?
Show answerHide answer

Correct answer: D Wikis

Explanation

Explanation:
This question tests knowledge of the appropriate GitHub tool for hosting project documentation. While several features can contain textual information, one is specifically designed as a free-form, wiki-style space for creating and organizing comprehensive documentation, separate from the codebase and its change history.

Correct Option:

D. Wikis
GitHub Wikis are a dedicated, built-in feature for creating long-form, community-editable documentation. They exist as a separate space within the repository, supporting markdown, easy navigation, and page history, making them ideal for manuals, guides, and detailed project notes.

Incorrect Option(s):

A. Insights
The Insights tab provides analytics and data about the repository (like traffic, contributors, and code frequency). It is for viewing metrics, not for writing or storing project documentation.

B. Pull Requests
Pull Requests are for proposing, discussing, and reviewing code changes. While they contain descriptions and comments, they are part of the development workflow and are not structured or intended to serve as persistent documentation.

C. Projects
GitHub Projects is a tool for project management and issue/PR tracking, organized in boards or tables. It is used for planning and workflow, not for hosting narrative or instructional documentation.

Reference:
GitHub Docs, "About wikis," which states: "You can use a wiki to share detailed, long-form information about your project, such as how to use it, how you designed it, or its core principles." This directly defines its purpose for long-form documentation.
Question 13 Choose 1
A distributed version control system is best described as a system that:
Show answerHide answer

Correct answer: C Ensures each developer has their own local copy of the entire code repository, including the complete project history and metadata.

Explanation

Explanation:
This question tests the fundamental principle of a Distributed Version Control System (DVCS), such as Git (which GitHub is built upon). The key characteristic of a DVCS is that every contributor clones a full copy of the repository, including its entire history, enabling offline work and redundancy.

Correct Option:

C. Ensures each developer has their own local copy of the entire code repository, including the complete project history and metadata.
This is the defining feature of a DVCS like Git. Each clone is a complete, self-contained repository with full history, allowing full functionality (committing, branching, viewing logs) without a network connection to a central server.

Incorrect Option(s):

A. Relies on a central server to store the entire project history and allows developers to check out files for editing.
This describes a Centralized Version Control System (CVCS) like Subversion (SVN). In a CVCS, the central server is the single source of truth, and developers typically check out only specific files, not the entire history.

B. Stores project files on a cloud-based server and allows multiple developers to collaborate on the same codebase simultaneously.
While this describes a collaborative outcome enabled by platforms like GitHub, it is not the definition of a DVCS. Collaboration is a benefit, but the core architectural distinction is the local, full copy.

D. Requires developers to manually track and manage different versions of their files using naming conventions and manual backups.
This describes a manual, ad-hoc method with no formal system—the problem version control is designed to solve. It is the antithesis of an automated DVCS.

Reference:
Git documentation and common DVCS principles. The core concept is that in distributed systems, "every clone is a full backup" of the repository. GitHub's own fundamentals are built on Git's distributed model.
Question 14 Choose 1
Which of the following best describes GitHub flow
Show answerHide answer

Correct answer: C A lightweight workflow that allows for safe experimentation with new ideas and collaboration on projects through branching, pull requests, and merging

Explanation

Explanation:
This question tests understanding of the official GitHub Flow workflow. It is designed as a simple, branch-based workflow for teams using GitHub's core features. It emphasizes short-lived branches, pull requests for collaboration and review, and continuous deployment from the main branch.

Correct Option:

C. A lightweight workflow that allows for safe experimentation with new ideas and collaboration on projects through branching, pull requests, and merging
This directly paraphrases the official description of GitHub Flow. It is centered on creating a feature branch from main, making commits, opening a pull request for discussion and review, and then merging back to main for deployment. Its simplicity is its key characteristic.

Incorrect Option(s):

A. A branching model that uses feature branches and multiple primary branches
GitHub Flow uses feature branches but advocates for a single primary branch (main or master). Using multiple long-lived primary branches (e.g., develop, release) is characteristic of GitFlow, a more complex model.

B. A strategy where separate branches are created for each release, and pull requests are used to collaborate on and approve releases
This more closely describes a release branch strategy, which can be part of workflows like GitFlow. GitHub Flow does not prescribe dedicated release branches; releases are typically tagged directly from main.

D. A strict workflow that enforces a linear development process with all changes made directly on the main branch
This is the opposite of GitHub Flow. GitHub Flow is built around the principle of not committing directly to main for new features. It encourages branching to isolate changes, making the process non-linear.

Reference:
GitHub Docs, "GitHub flow," which introduces it as: "a lightweight, branch-based workflow." The documentation emphasizes creating branches for new ideas, using pull requests for collaboration, and merging frequently.
Question 15 Choose 3
Workflows can reference actions in:

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

Correct answer: A, B, F Any public repository.The same repository as your workflow file.

Explanation

Explanation:
This question tests knowledge of the valid sources for GitHub Actions within a workflow YAML file. An action is a reusable unit of code that can be referenced in a job's steps. The sources are explicitly defined by GitHub's architecture to include public repositories, the local repository, and container registries for Docker-based actions.

Correct Option:

A. Any public repository.
Actions can be referenced directly from any public GitHub repository using the syntax owner/repo@ref. This is how the vast ecosystem of community actions is consumed.

B. The same repository as your workflow file.
Actions can be defined in a path within the same repository (e.g., ./.github/actions/my-action), allowing for private, repository-specific custom actions.

E. A published Docker container image on Docker Hub.
Actions can be implemented as Docker containers. These can be referenced from any public Docker registry, including Docker Hub, using the docker:// syntax or the runs.image key in an action definition.

Incorrect Option(s):

C. GitHub Packages.
While GitHub Packages is a registry for packages (like npm, Maven), and you can store container images there for use in workflows, it is not a distinct source type for referencing actions. A Docker action stored in GitHub Packages would be referenced as a container image (option E), not uniquely as "GitHub Packages."

D. An enterprise marketplace.
This is a conceptual misnomer. GitHub has a GitHub Marketplace for discovering actions, but you reference the action's source repository (option A), not the marketplace itself. There is no "enterprise marketplace" as a distinct source syntax.

Reference:
GitHub Docs, "About actions," in the "Types of actions" and "Finding and customizing actions" sections, which detail that actions can be defined in a Docker container, JavaScript, or as a composite action, and can be used from the same repository, any public repository, or from a publicly published Docker container image.
Question 16 Choose 1
What is the primary purpose of creating a security policy in a repository?
Show answerHide answer

Correct answer: C To describe how security vulnerabilities should be responsibly disclosed

Explanation

Explanation:
This question tests the specific function of the SECURITY.md file, or security policy, in a GitHub repository. This is a dedicated feature designed to streamline the process of reporting security flaws, ensuring they are handled safely and privately before public disclosure, which is a critical aspect of responsible open-source maintenance.

Correct Option:

C. To describe how security vulnerabilities should be responsibly disclosed
The primary purpose of a security policy (typically a SECURITY.md file) is to provide clear, public instructions for researchers and users on how to confidentially and responsibly report security vulnerabilities to the project maintainers, often via a private channel.

Incorrect Option(s):

A. To ensure that peer code review occurs before new changes are merged
This is enforced through branch protection rules (e.g., "Require pull request reviews before merging"), not the security policy document. The policy is for reporting flaws, not mandating a review process.

B. To define which types of secrets are blocked with push protection
This is configured via secret scanning and push protection settings, often at the organization or repository settings level. It is an automated enforcement, not a policy document.

D. To customize the repository's Dependabot configuration
Dependabot is configured via a .github/dependabot.yml file. While a security policy might mention a commitment to updates, the actual configuration is a separate, operational file.

Reference:
GitHub Docs, "Adding a security policy to your repository," which states: "You can give your project-specific instructions for reporting a security vulnerability in a SECURITY.md file..." This directly defines its purpose.
Question 17 Choose 3
Which of the following steps are part of the Codespaces lifecycle?

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

Correct answer: C, E, F RebuildDeleteCreate

Explanation

Explanation:
This question tests knowledge of the explicit, user-managed lifecycle stages of a GitHub Codespace. A Codespace is a cloud-based development container with a defined lifecycle from creation to termination. The correct options are the primary, discrete actions a user can perform to manage its state.

Correct Option:

C. Rebuild:
This action recreates the Codespace's container from scratch using the current devcontainer configuration. It is essential for applying changes to the environment definition and is a core lifecycle management step.

E. Delete:
This is the final lifecycle action, permanently removing the Codespace and its associated cloud resources. It is a critical step for cost management and cleanup.

F. Create:
This is the initial lifecycle step, where a new Codespace is provisioned from a repository, branch, or prebuild. It sets up the full development environment in the cloud.

Incorrect Option(s):

A. Commit:
This is a Git operation performed on the code within the Codespace, not an action on the Codespace environment itself. It is part of the development workflow, not the Codespace lifecycle.

B. Clone:
This is also a Git operation (copying a repository). While you can clone a repo into a Codespace, or a Codespace is created by cloning a repo in the background, it is not a distinct, user-facing lifecycle step for the Codespace environment.

D. Rollback:
This is not a defined lifecycle action for Codespaces. While you can revert code commits or potentially recreate a Codespace from an earlier point, "rollback" is not a standard, direct management action.

G. Install:
This describes installing software or dependencies inside a running Codespace, typically part of its setup script (postCreateCommand). It is a process that happens during creation or rebuild, not a top-level lifecycle step.

Reference:
GitHub Docs, "Deep dive into GitHub Codespaces," particularly the lifecycle management section. The user interface and API provide explicit options to Create, Rebuild, and Delete a codespace, defining its core lifecycle.
Question 18 Choose 1
What is the minimum access needed to contribute to a repository?
Show answerHide answer

Correct answer: D D. Write

Explanation

Explanation:
This question tests the understanding of GitHub's repository permission levels and the minimum required to actively contribute code. While various roles can participate in the project management workflow (like triaging issues), the act of contributing code via commits and pull requests requires the ability to write to a branch.

Correct Option:

D. Write
The "Write" permission is the minimum required to push commits directly to branches (excluding protected branches) and to create/update pull requests from those branches. This level grants the necessary access to modify the repository's content, which is fundamental to contribution.

Incorrect Option(s):

A. Read
"Read" access only allows viewing and cloning the repository. A user cannot push changes or create branches in the repository, making active code contribution impossible at this level.

B. Triage
The "Triage" role, specific to organization repositories, allows managing issues and pull requests (e.g., applying labels, milestones) but does not grant write access to the code. A user with Triage access cannot push commits.

C. Maintain
"Maintain" is a higher permission level than "Write" that includes additional administrative abilities like managing repository settings and GitHub Actions. While a Maintainer can contribute, it is not the minimum required; "Write" is sufficient.

Reference:
GitHub Docs, "Repository roles for an organization," which specifies that the Write role "Can read and clone this repository. Can also push to and create branches in this repository." This defines the baseline for code contribution. For personal repositories, a collaborator must be granted write access.
Question 19 Choose 1
Which of the following can be performed within GitHub Mobile?
Show answerHide answer

Correct answer: E Managing notifications from github.com

Explanation

Explanation:
This question tests the practical scope of the GitHub Mobile application. It is designed for on-the-go management, triage, and light collaboration, not for performing complex repository administration, running workflows, or providing full peer-to-peer communication features. Its core utility revolves around staying updated and performing simple actions.

Correct Option:

E. Managing notifications from github.com
This is a primary function of GitHub Mobile. The app provides a streamlined interface to triage, read, and act on notifications (e.g., for issues, pull requests, discussions) that originate from activity on github.com.

Incorrect Option(s):

A. Utilizing the mobile device as a self-hosted runner
False. A self-hosted runner is a machine configured to execute GitHub Actions jobs. While a mobile device is technically a computer, the GitHub Actions runner software is not supported on iOS/Android, and this is not a feature of the GitHub Mobile app.

B. Managing enterprise and organization settings
False. These are administrative settings managed via the web interface (github.com) by users with appropriate owner or admin permissions. The mobile app does not provide interfaces for deep administrative configuration.

C. Chat with other GitHub Mobile users via voice calling
False. GitHub Mobile does not have built-in voice or video chat functionality. Communication happens through text-based comments on issues, PRs, and discussions, which the app supports.

D. Forking and cloning repositories
While you can browse repositories and even view the Fork button, the mobile app's capabilities for the full fork-and-clone Git operation are limited. You cannot clone a repository to your mobile device's local file system to work on code as you would on a desktop. The app focuses on remote interactions.

Reference:
The official GitHub Mobile app description and feature list, which highlights "Stay on top of your work with notifications" and "Triage issues and pull requests" as key features, aligning with notification management.
Question 20 Choose 1
Which of the following is a primary goal of GitHub's community?
Show answerHide answer

Correct answer: C Facilitating collaboration and creativity

Explanation

Explanation:
This question tests the understanding of GitHub's stated mission and community principles. GitHub's platform is built to be a foundational tool for software collaboration at scale. Its official messaging and product design consistently emphasize lowering barriers to collaboration, sharing, and building software together, which inherently fosters creativity.

Correct Option:

C. Facilitating collaboration and creativity
This is a core, stated goal of GitHub. The platform's features—like forking, pull requests, discussions, and Codespaces—are all designed to make collaborative development easier and more accessible, enabling developers to build and create together regardless of location or background.

Incorrect Option(s):

A. Exclusively supporting experienced developers
False. GitHub actively supports developers of all skill levels through educational resources (GitHub Learning Lab), beginner-friendly documentation, and free tiers. Its goal is to be inclusive, not exclusive.

B. Creating a competitive environment for developers
While individual developers or companies may compete, this is not a primary goal of the GitHub platform itself. GitHub's tools are designed for cooperation, not competition. A "competitive environment" contradicts its collaborative ethos.

D. Enforcing strict code quality standards
False. While GitHub provides tools that help teams enforce standards (e.g., branch protection, status checks, code scanning), the platform itself does not enforce a universal standard. Establishing and enforcing code quality is the responsibility of the repository owners and teams, not GitHub as a community goal.

Reference:
GitHub's "Mission" statement and "Community" guidelines emphasize building together. The GitHub Docs homepage states: "GitHub is where over 100 million developers shape the future of software together." This clearly frames collaboration as the primary goal.
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