All Microsoft exams

Microsoft GH-900: GitHub Foundations

What the GH-900 exam covers and what it costs, with a free 30-question practice test and an explanation for every answer.

At a glance
Level
Foundational
Topic areas
5
Free practice questions
30
Full question bank
100 questions

What the GH-900 exam covers

The topic areas in our GH-900 question bank, with each one's share of the 100 practice questions.

GH-900 cost and format

Exam codeGH-900
CertificationGitHub Foundations
VendorMicrosoft
LevelFoundational
StatusActive

Last checked October 22, 2026 against the official Microsoft exam page.

GH-900 sample questions

The first 5 questions from the free practice test. Open a question to see the answer and why it is right.

All 30 free questions
  1. Question 1Git and GitHub fundamentals

    A developer has made changes to a file on a local branch and wants to save a snapshot of those changes in the project history. Which Git command creates the snapshot?

    1. Agit init
    2. Bgit pull
    3. Cgit push
    4. Dgit commit
    Show answer and explanation
    Correct answer: D

    git commit records the staged changes as a new snapshot in the local repository history. Cloning copies a remote repository, fetching downloads remote updates without merging, and init creates a new repository.

  2. Question 2Collaboration and pull requests

    A pull request must not be merged until at least two reviewers approve it and the automated tests pass. Which GitHub feature enforces this?

    1. AA README file that asks reviewers to approve the pull request
    2. BBranch protection rules with required reviews and required status checks
    3. CA label named approved that reviewers add by hand after each round
    4. DA wiki page listing the reviewers and their approval status
    Show answer and explanation
    Correct answer: B

    Branch protection rules can require a number of approving reviews and passing status checks before merge, which enforces the policy. A README, a label or a wiki page is informational and does not block merging.

  3. Question 3Security and compliance

    A developer accidentally committed an API token to a repository. What should happen first?

    1. APost the full token value in a new issue so that the whole team and every reviewer can see it and track it
    2. BLeave the token as it is because the repository is private and access is limited to trusted collaborators
    3. CRevoke the token and issue a new one, then remove the secret from the history if needed
    4. DDelete the latest commit with git reset --hard HEAD~1 and force push the branch, leaving the secret
    Show answer and explanation
    Correct answer: C

    A committed secret must be treated as compromised, so revoking and rotating it comes first, and history cleanup is secondary. Assuming privacy, deleting only the last commit and posting the token all leave the secret exposed.

  4. Question 4GitHub Copilot and automation

    A developer wants AI-assisted code suggestions and chat inside the editor while writing code. Which GitHub product provides this?

    1. AGitHub Sponsors
    2. BGitHub Copilot
    3. CGitHub Gists
    4. DGitHub Pages
    Show answer and explanation
    Correct answer: B

    GitHub Copilot provides AI-assisted code suggestions and chat in supported editors. GitHub Pages hosts websites, Sponsors manages funding, and Gists store snippets.

  5. Question 5Community and organizations

    A company wants to group its repositories and manage access for several teams from one place. Which GitHub structure should it use?

    1. AAn organization with teams and repository permissions
    2. BA single shared password for each department's repositories
    3. CA personal account for each developer, holding repositories
    4. DA public gist per team, each listing its members and their roles
    Show answer and explanation
    Correct answer: A

    Organizations group repositories and manage teams and permissions centrally, which suits a company. Individual accounts, shared passwords and gists do not provide centralized team management.

How to prepare for GH-900

  1. Read the official Microsoft outline first (exam page), so you know exactly what is in scope.
  2. Give the most time to Git and GitHub fundamentals and Collaboration and pull requests: together they make up 51% of the questions.
  3. Take the free 30-question practice test and note which topics you miss.
  4. Go back to the weak topics, then test again. A practice score shows where to study; it does not predict your exam result.

Full GH-900 question bank

All 100 questions with answers and explanations, as a PDF, an online practice exam, or both.

Full question bank
Coming to the store soon

The full 100-question bank for GH-900 is in final review. The free practice test is open now.

Start the free practice test

GH-900 FAQ