Microsoft certification · Exam GH-900

GH-900 Mock Exam

GitHub Foundations

Find out if you're ready for GH-900. Take the free timed mock exam and get your score in minutes, or study the free GH-900 questions below with answers and explanations.

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

Free GH-900 questions

1–10 of 36 free
Question 1 Choose 1
Which of the following best describes a Codespace?
Show answerHide answer

Correct answer: C A development environment hosted in the cloud

Explanation

Explanation:
The question tests the fundamental definition of GitHub Codespaces. A Codespace is a cloud-hosted development container that provides a full, configurable development environment accessible from a browser or through Visual Studio Code. While it integrates with browser editing and devcontainers, its core value proposition is providing a complete, hosted environment, not just an editor, AI tool, or local plugin.

Correct Option:

C. A development environment hosted in the cloud
GitHub Codespaces is a cloud-powered, configurable development environment accessible via browser or VS Code. It is built on development containers ("devcontainers") and runs on virtual machines managed by GitHub, providing a consistent, pre-built environment with compute resources, eliminating local setup.

Incorrect Option(s):

A. A lightweight editing experience that runs entirely in your browser
This describes the browser-based editor available within a Codespace, but not the Codespace itself. The Codespace is the complete underlying environment (OS, runtime, tools) that hosts this lightweight editor.

B. An AI pair programmer that offers autocomplete-style suggestions
This describes GitHub Copilot, a separate AI-powered code completion tool. While Copilot can be integrated into a Codespace, it is not a defining characteristic of what a Codespace is.

D. A Visual Studio Code plug-in to manage local devcontainers
This describes the "Dev Containers" extension for VS Code, which allows you to open a folder in a local container. A Codespace is the remote, hosted version of this concept, not a local plugin.

Reference:
GitHub Docs, "About GitHub Codespaces," which states: "GitHub Codespaces is a cloud-based development environment... Each codespace runs on a virtual machine hosted by GitHub."
Question 2 Choose 2
What are the two main reasons why one might fork a repository?

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

Correct answer: B, C To propose changes to the base repositoryTo create a new repository based on an existing one

Explanation

Explanation:
This question tests the primary purposes of forking in the Git/GitHub collaboration workflow. A fork is a personal, server-side copy of another user's repository. Its main functions are to serve as an independent starting point for a new project or, more commonly within open-source, as the mechanism to propose changes back to the original ("upstream") repository via pull requests.

Correct Option:

B. To propose changes to the base repository
Forking is the standard model for contributing to public repositories where you don't have write access. You fork it to your account, make changes in your copy, and then submit a pull request from your fork back to the original "base" repository to propose those changes for integration.

C. To create a new repository based on an existing one
This is the foundational definition of forking—creating a new, independent repository under your namespace that starts with the same code, commit history, and branches as the source. This is often the first step in using another project as a starting point for your own distinct project.

Incorrect Option(s):

A. To create an issue or open a discussion
You do not need to fork a repository to create an issue or start a discussion. These are collaborative features that can be performed directly on the original repository if you have the appropriate permissions or if the repository is public.

D. To create a new branch to develop a new feature
This describes branch creation within a single repository. Creating a new branch is a fundamental Git operation that does not require forking. Forking creates an entirely separate repository, which is a more significant architectural divergence than creating a branch.

Reference:
GitHub Docs, "About forks," which states: "A fork is a new repository that shares code and visibility settings with the original 'upstream' repository." It also explains that forks are used to propose changes to someone else's project or to use someone else's project as a starting point for your own idea.
Question 3 Choose 1
Which of the following are displayed in the "Pinned Repositories" section of a GitHub user profile?
Show answerHide answer

Correct answer: B Repositories that were personally selected to be highlighted

Explanation

Explanation:
This question tests knowledge of GitHub's profile customization features. The "Pinned Repositories" section is a user-curated space designed for showcasing specific work. It is a manual selection, not an automated list based on metrics like activity, popularity, or organizational affiliation. This allows users to control their public profile narrative.

Correct Option:

B. Repositories that were personally selected to be highlighted
The Pinned Repositories section is explicitly for user-curated content. A user manually chooses up to six repositories from those they have contributed to or own, providing a customizable snapshot of their most important or representative work for profile visitors.

Incorrect Option(s):

A. Repositories with the most recent activity
While a repository's activity feed shows recent commits, issues, etc., this is not the criterion for pinning. The "Pinned" section is static based on user choice, not dynamically updated based on activity.

C. Repositories that are owned by organizations in which the user is a member
A user can pin repositories they have contributed to, regardless of owner (personal or organizational), but organizational membership alone does not dictate what appears in this manually configured section.

D. Repositories with the highest number of stars
Popularity, indicated by star count, is not a factor in pinning. A user may choose to highlight a lesser-known but significant project. The "Popular repositories" section on a profile, however, may be influenced by such metrics.

Reference:
GitHub Docs, "Customizing your profile," specifically the section on "Pinning repositories to your profile," which states: "You can pin public repositories you own or have contributed to to your profile..." confirming it is a manual, personal selection.
Question 4 Choose 1
Which of the following can be performed within GitHub Desktop?
Show answerHide answer

Correct answer: C Adding and cloning repositories

Explanation

Explanation:
This question tests understanding of the scope of GitHub Desktop, which is a focused GUI client for core Git and GitHub repository operations. Its primary purpose is to simplify version control workflows like committing, branching, and syncing, but it does not replicate the full collaborative and project management features of the GitHub web interface or other integrated tools.

Correct Option:

C. Adding and cloning repositories
This is a core function of GitHub Desktop. Its workflow begins with adding an existing local repository or cloning a remote one from GitHub. The interface is designed to make these initial setup steps straightforward for users managing repositories on their local machine.

Incorrect Option(s):

A. Creating and managing issues
Issue tracking is a project management feature of the GitHub web platform. GitHub Desktop is focused on Git operations (commits, history, branching) and does not include interfaces for creating or managing issues.

B. Reviewing and approving pull requests
While GitHub Desktop can help you check out pull request branches locally to test them, it does not provide a UI for the collaborative review process, commenting on diffs, or formally approving pull requests, which are actions performed on GitHub.com.

D. Commenting on discussions
Discussions are a community feature hosted on GitHub.com. GitHub Desktop does not have functionality to interact with this social/community layer; it is strictly a repository and version control tool.

E. Integrating with office suite software
There is no native integration with office software (like Word or Excel) within GitHub Desktop. Managing office files in a repo would be done at the file system level, with Git tracking changes via the client, but no direct editing or integration features exist.

Reference:
GitHub Docs, "Getting started with GitHub Desktop," which outlines its primary functions: cloning repositories, committing work, and synchronizing changes. The documented feature set confirms it is a Git client, not a full GitHub web interface replacement.
Question 5 Choose 4
Which of the following are available statuses of a pull request?

(Each answer presents a complete solution. Choose four
Show answerHide answer

Correct answer: A, B, D, F DraftClosedMergedOpen

Explanation

Explanation:
This question tests knowledge of the explicit lifecycle states of a pull request on GitHub. A pull request transitions through well-defined statuses that indicate its current condition in the review and integration workflow. These are distinct from actions performed on it (like rebasing) or generic descriptive terms (like modified).

Correct Option:

A. Draft:
This status indicates a pull request is a work-in-progress and not yet ready for formal review. It signals to collaborators that the changes are incomplete.

B. Closed:
This status signifies a pull request that was not merged. It can be closed by the author, a maintainer, or automatically if the target branch is deleted.

D. Merged:
This is the final, successful status for a pull request where its commits have been integrated into the base branch. The PR is then read-only.

F. Open:
This is the default active status for a pull request that is ready for review or is currently under review. It indicates the proposed changes are pending integration.

Incorrect Option(s):

C. Rebasing:
This is a Git operation that can be performed on the branch associated with a pull request, not a PR status itself. A PR remains "Open" during and after a rebase.

E. Modified:
This is not a PR status. A pull request's branch can be modified with new commits, but the PR's primary status remains "Open" (or "Draft") until it is merged or closed.

Reference:
GitHub Docs, "About pull requests," which explicitly lists and describes the states of a pull request: Open, Closed, Merged, and Draft.
Question 6 Choose 1
What folder is the definition files stored in when creating custom issue forms?
Show answerHide answer

Correct answer: C .github/ISSUE_TEMPLATE

Explanation

Explanation:
This question tests knowledge of the specific directory structure required for GitHub's advanced issue template features. To use custom, form-based issue templates—defined in YAML—they must be placed in a very specific, recognized directory within the repository for GitHub to automatically detect and use them.

Correct Option:

C. .github/ISSUE_TEMPLATE
Custom issue forms defined in YAML (.yml or .yaml files) must be stored in the .github/ISSUE_TEMPLATE/ directory at the root of the repository. This is the standardized, required location for GitHub to recognize and render these forms on the "New issue" page.

Incorrect Option(s):

A. .issues
This is not a standard or recognized folder for GitHub issue templates. Placing definition files here will not cause GitHub to detect or use them as custom issue forms.

B. .issues/ISSUE_TEMPLATE
While the ISSUE_TEMPLATE subfolder name is correct, the parent directory must be .github, not .issues. This incorrect parent folder will prevent the templates from being recognized.

D. .GitHub
While case-insensitivity on some systems might allow this, the official, documented, and conventional name for the directory is lowercase .github. Using .GitHub is non-standard and could lead to inconsistencies, especially on case-sensitive file systems.

Reference:
GitHub Docs, "Configuring issue templates for your repository," specifically the section "Creating issue forms," which states: "Issue forms are defined in YAML using GitHub's form schema. You can add your issue form YAML file to the .github/ISSUE_TEMPLATE folder in your repository."
Question 7 Choose 1
Which of the following best describes GitHub Pages?
Show answerHide answer

Correct answer: A Webpages hosted and published through GitHub repositories

Explanation

Explanation:
This question tests the fundamental definition of GitHub Pages, a core hosting feature. It is a static site hosting service designed to publish web content directly from a GitHub repository. It is not related to API handling, general project documentation (like Wikis), or educational guides about GitHub itself.

Correct Option:

A. Webpages hosted and published through GitHub repositories
GitHub Pages takes HTML, CSS, and JavaScript files from a repository—either from a dedicated branch or folder—and publishes them as a static website. It is directly integrated with the repository's workflow, allowing sites to be built and deployed automatically from pushes to the repository.

Incorrect Option(s):

B. Handles pagination for API requests
This describes a feature of the GitHub REST API itself, where responses are paginated to manage large data sets. It is unrelated to hosting websites. GitHub Pages does not handle or interact with API request pagination.

C. Hosts long-form documentation about your project
While you can use GitHub Pages to build a documentation site (like with Jekyll), this describes a potential use case, not the service's definition. The primary feature for hosting long-form project documentation in a wiki-like format is a repository's Wiki feature.

D. Curated guides around how to use GitHub products
This describes official GitHub documentation, learning labs, or guides. GitHub Pages is a tool used by developers, not the source of GitHub's own product documentation.

Reference:
GitHub Docs, "About GitHub Pages," which opens with: "GitHub Pages is a static site hosting service that takes HTML, CSS, and JavaScript files straight from a repository on GitHub..."
Question 8 Choose 1
Which of the following best describes cloning a repository?
Show answerHide answer

Correct answer: C It creates a copy of the repository on your local machine.

Explanation

Explanation:
This question tests the basic Git operation of cloning. Cloning is the fundamental command for downloading a full copy of a remote repository—including all files, commit history, and branches—to set up a local working environment. It is the first step for a developer to start contributing to a project.

Correct Option:

C. It creates a copy of the repository on your local machine.
The git clone command is used to create a complete, local copy of a remote repository. This local copy includes the entire project history and configuration, establishing a connection to the original remote (usually named origin) for future synchronization via push and pull.

Incorrect Option(s):

A. It creates a copy of the repository on GitHub.com.
Creating a server-side copy on GitHub.com is achieved by forking a repository, not cloning. Cloning is a local operation initiated from a developer's machine.

B. It retrieves code updates from the remote repository.
This describes the git pull or git fetch commands, which synchronize an existing local repository with new changes from its remote counterpart. Cloning is the initial one-time download that creates the local repository.

D. It imports your source code into a new repository.
This describes initializing a new repository (e.g., git init) and then adding a remote, or using GitHub's import feature to bring in code from another version control system. Cloning presupposes an existing remote repository.

Reference:
Git documentation and GitHub Docs, "Cloning a repository," which states: "You can clone a repository from GitHub.com to your local computer..." This clearly defines it as a local copy operation.
Question 9 Choose 1
Which of the following GitHub syntax formats is consistent with the associated text?
Show answerHide answer

Correct answer: C

Explanation

Explanation:
This question tests knowledge of GitHub Flavored Markdown (GFM) syntax conventions used throughout GitHub (in issues, pull requests, READMEs, etc.). The correct pair must match the exact markdown syntax required to produce the described formatting, such as using for HTML-style comments.

Correct Option:

C.
This is the correct HTML-style syntax for a comment in GitHub Flavored Markdown. Text placed between is not rendered on the page and is used for adding hidden notes within markdown content.

Incorrect Option(s):

A. * This is a heading
Headings in markdown are created using hash symbols (#), not an asterisk. For example, # This is a heading. An asterisk followed by a space creates a bullet point in an unordered list.

B. [This is a link]
This syntax is incomplete for a link. A proper markdown link requires both the link text in square brackets and the URL in parentheses immediately after, like [This is a link](https://example.com). The provided text is missing the URL component.

D. This is bolded text
To bold text in markdown, you must surround it with double asterisks or double underscores, like **This is bolded text**. The plain text shown would not be formatted.

E. 1. This is an ordered list
While this is technically correct syntax for starting an ordered list, the numbering in markdown is automatically standardized. The key is that it must be followed by a period and a space. The other options have more fundamental syntax errors, making this less "incorrect" but not the single consistent format as required by the question.

Reference:
GitHub Docs, "Basic writing and formatting syntax," which details that headings use #, links use [text](url), comments use , and bold uses **text**.
Question 10 Choose 2
Who can be assigned to an Issue or pull request?

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

Correct answer: B, D Anyone who has commented on the Issue or pull requestAnyone with write permissions to the repository

Explanation

Explanation:
This question tests the permissions and assignment rules for GitHub Issues and Pull Requests. Assignment is a core project management feature used to delegate responsibility. The ability to assign a user is governed by repository permissions, while who can be assigned depends on their relationship to the repository.

Correct Option:

B. Anyone who has commented on the Issue or pull request
Once a user has participated in the conversation by commenting on an Issue or Pull Request, they become an eligible assignee for that specific item, regardless of their repository-wide role (e.g., even a "Read" user). This is a key workflow feature.

D. Anyone with write permissions to the repository
Users with "Write" permissions or higher (Maintain, Admin) are automatically eligible to be assigned to any Issue or PR in that repository. They have a direct collaborative role on the project's code and management.

Incorrect Option(s):

A. Anyone who has an enterprise GitHub account
Account type (Enterprise, personal) does not determine assignability. A user must have some form of access to the specific repository—either through explicit permission, organization membership, or prior participation—to be assigned.

C. Anyone who has a personal GitHub account
This is too broad. A personal GitHub account holder must be granted access to the repository (e.g., as a collaborator or organization member) or have previously commented on the item to be assignable. Mere account existence is insufficient.

Reference:
GitHub Docs, "Assigning issues and pull requests to other GitHub users," which states: "You can assign issues and pull requests to anyone who has write permissions to the repository or to anyone who has commented on the issue or pull request." This directly matches the correct answers.
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
These GH-900 practice questions with explanations are designed to help beginners build a strong foundation in GitHub concepts. The questions cover repositories, version control, collaboration workflows, GitHub Actions, and security features. Each explanation breaks down the logic behind the correct answer, making it easier to understand core concepts. This method promotes deeper learning and helps candidates connect theory with practical usage. Regular practice allows learners to strengthen their understanding of GitHub fundamentals and gain confidence in using the platform effectively in both real-world projects and certification exams.

GH-900 GitHub Foundations Official Exam Blueprint and Weight


1. Introduction to Git and GitHub
Official Exam Weight: 10%
Subtopics
: Version control concepts, distributed vs centralized version control, Git overview and core principles, GitHub overview and purpose, difference between Git and GitHub, GitHub product offerings, GitHub Free vs Pro vs Team vs Enterprise, GitHub Desktop overview, GitHub Mobile overview, GitHub CLI overview, GitHub documentation and learning resources, Trailhead and Microsoft Learn integration, GitHub Skills platform, GitHub community and support channels, GitHub pricing and billing basics.

2. Work with GitHub Repositories
Official Exam Weight: 15%
Subtopics:
Creating a new repository, repository visibility settings, public vs private vs internal repositories, initializing a repository with README, gitignore and license files, cloning a repository, forking a repository, difference between cloning and forking, repository templates, repository settings overview, repository topics and descriptions, repository starring and watching, pinning repositories, repository insights and traffic, repository archiving, deleting a repository, repository transfers, GitHub Pages basics, wikis overview, repository discussions overview.

3. Collaborate Using GitHub Branches and Pull Requests
Official Exam Weight: 20%
Subtopics
: Branch concepts and purpose, creating and deleting branches, default branch configuration, branch naming conventions, commits and commit messages, staging and committing changes, pushing changes to remote, pull request creation and purpose, pull request titles and descriptions, draft pull requests, pull request reviewers and assignees, pull request labels and milestones, requesting reviews, reviewing pull requests, leaving comments on pull requests, suggesting changes in pull requests, approving and requesting changes, pull request merge strategies, merge commit, squash and merge, rebase and merge, auto-merge, resolving merge conflicts, closing pull requests, linked issues and pull requests, pull request templates.

4. Work with GitHub Issues and Project Planning
Official Exam Weight: 15%
Subtopics:
GitHub Issues overview and purpose, creating and managing issues, issue titles and descriptions, issue labels creation and management, default labels overview, issue assignees and milestones, issue templates, task lists within issues, closing issues with keywords in pull requests, issue references and cross-linking, pinning issues, transferring issues, GitHub Projects overview, Projects vs classic Projects, creating a project, project views, board view, table view, roadmap view, adding issues and pull requests to projects, custom fields in projects, project workflows and automation, project insights, GitHub Milestones overview, tracking progress with milestones.

5. Understand GitHub Flow and Collaborative Development
Official Exam Weight: 15%
Subtopics:
GitHub Flow overview and steps, branching strategy in GitHub Flow, committing early and often, opening pull requests for collaboration, code review process and best practices, merging and deploying with GitHub Flow, trunk-based development overview, inner source concepts, open source contribution workflow, contributing to public repositories, forking and submitting pull requests to upstream repositories, maintaining a fork in sync with upstream, GitHub Sponsors overview, README best practices, CONTRIBUTING.md files, CODE_OF_CONDUCT.md files, CODEOWNERS file overview, issue and pull request etiquette.

6. Use GitHub Actions for Automation Basics
Official Exam Weight: 10%
Subtopics:
GitHub Actions overview and purpose, workflows, jobs, steps, and actions explained, workflow triggers and event types, YAML syntax basics for workflows, viewing workflow runs in the Actions tab, workflow run logs and status, re-running failed workflows, disabling and enabling workflows, GitHub Actions Marketplace overview, using community actions in workflows, GitHub-hosted runners overview, understanding minutes and storage for Actions, Actions permissions at repository level, basic CI workflow example, status badges for workflows.

7. Describe GitHub Security and Administration Basics
Official Exam Weight: 10%
Subtopics:
Authentication methods overview, username and password, two-factor authentication, passkeys, SSH keys, personal access tokens, fine-grained personal access tokens vs classic tokens, SAML SSO overview, repository permission levels, organization roles overview, team creation and management basics, branch protection rules overview, required reviews and status checks, secret scanning overview, Dependabot alerts overview, code scanning overview, security advisories overview, private vulnerability reporting, repository security policy, SECURITY.md file, audit log basics.

8. Manage GitHub Notifications and Account Settings
Official Exam Weight: 5%
Subtopics:
Notification settings and preferences, watching and unwatching repositories, subscribing and unsubscribing from issues and pull requests, notification delivery methods, email notifications, web and mobile notifications, managing notification inbox, filtering and triaging notifications, GitHub profile setup, profile README, contribution graph overview, GitHub achievements, managing email addresses in account settings, managing SSH and GPG keys, theme and appearance settings, accessibility settings overview.

GH-900: What GitHub Foundations Is About


The GH-900 GitHub Foundations exam checks whether you understand GitHub’s everyday workflow—how teams collaborate, manage code, and keep projects organized. It’s a great starting point if you’re new to GitHub or want to validate your basics before moving to Actions, Security, or Admin tracks.

Must-Know Concepts


GitHub basics: repositories, branches, commits, tags, forks
Collaboration: pull requests, reviews, merge strategies, conflicts
Issues & planning: labels, milestones, projects, discussions
Documentation: README, wikis, markdown, contributing guidelines
Access & visibility: public vs private, teams/roles at a basic level
Good practices: commit messages, PR templates, CODEOWNERS concept, etiquette

Best Way to Prepare


Practice the full workflow in a small demo repo: create a branch, open a pull request, request a review, resolve a comment, and merge cleanly. Then repeat the same flow using Issues + a Project board so you understand how GitHub connects planning to code.

Mistakes People Commonly Make


Mixing up forks vs branches
Not understanding what happens during a PR (checks, reviews, merge options)
Skipping Issues/Projects because they “feel non-technical”
Confusing roles and permissions at repo vs org level

Practice That Builds Confidence


Free GH-900 exam questions often use simple language but the options can be sneaky. Doing GitHub Foundations practice test helps you spot keyword clues and avoid basic traps.

Words From Our Customers


Security is critical in modern development. The GH-900 exam validates deep expertise in GitHub security features. MSmcqs.com practice test covered code scanning, secret scanning, and dependency review with advanced scenarios. The questions were challenging and exam-accurate. Highly recommended!
Sarah Williams, Security Engineer | Seattle, WA