CertGrid
GitHub Certification

GitHub Foundations Practice Exam

Validates foundational knowledge of Git and GitHub across the GH-900 domains - repositories, collaboration, modern development (Actions, Codespaces, Copilot, Pages), GitHub Projects, and administration.

Start with a free GitHub Foundations practice test, then work through 1,170 exam-style questions with full answer explanations, and take timed mock exams that score like the real thing.

1,170
Practice pool
~60 qs
Real exam
100 min
Real exam time
Foundational
Level
70%
Passing score

CertGrid runs a fixed 60-question timed mock, separate from the real exam format above.

Objective-mapped practice, aligned to current exam objectives · Reviewed Aug 2026 · Independent practice platform.

What the GitHub Foundations exam covers

Free GitHub Foundations practice test questions

A sample of 10 questions with answers and explanations. Sign up free to practice all 1,170.

  1. Question 1Understand Git and GitHub basics

    What is a Git repository?

    • AA read-only archive of a project's most recent release only
    • BA single file backed up on a shared network drive
    • CA project's version-controlled collection of files and its complete change historyCorrect
    • DA live editing session shared between collaborators in real time
    ✓ Correct answer: C

    A repository is the unit Git versions: the working files plus the .git directory holding every commit that has ever been made. Because the history is stored locally, cloning gives you the whole thing, and commit, branch, diff and log all work with no network. That is the practical difference between a repository and a shared folder.

    Why the other options are wrong
    • AA repository keeps the entire change history, not just the latest release snapshot.
    • BA repository is a full versioned project, not a single file on a network drive.
    • DGit repositories store committed history, not a real-time shared editing session.
  2. Question 2Work with GitHub repositories

    What does a .gitignore file do?

    • AEncrypts the repository
    • BAssigns reviewers
    • CTells Git which files/pathsCorrect
    • DPublishes a website
    ✓ Correct answer: C

    .gitignore tells Git which paths to leave untracked so they never appear in git status or get committed by accident. Patterns can match a directory with a trailing slash, an extension with a wildcard, or be re-included with a leading exclamation mark.

    Why the other options are wrong
    • AEncrypting the repository is not something .gitignore does, or Git does at all.
    • BAssigning reviewers is done by CODEOWNERS or by hand on the pull request.
    • DPublishing a website is what Pages does, and it is unaffected by ignore rules.
  3. Question 3Work with GitHub repositories

    A contributor accidentally committed a 200 MB video and now every 'git push' is rejected with a size error, even after deleting the file in a later commit. Why does the push still fail and what fixes it?

    • AThe .gitignore is missing; adding the file to .gitignore retroactively removes it from history
    • BThe large blob still exists in history, so the file must be removed from history (e.g.Correct
    • CThe branch is protected, so removing the protection rule will allow the oversized push
    • DGitHub is caching the old push; clearing the browser cache and retrying will succeed
    ✓ Correct answer: B

    Git history is immutable: deleting a file in a later commit adds a commit recording the deletion, while the original blob remains reachable in the earlier one. The push still carries it, so it is still rejected. Removing it means rewriting history with git filter-repo or BFG, then force-pushing.

    Why the other options are wrong
    • A.gitignore only affects untracked files going forward and cannot rewrite existing history.
    • CBranch protection does not raise the file-size limit; the oversized blob in history is the cause.
    • DThe rejection comes from a large blob in history, not from any client- or server-side cache.
  4. Question 4Explore the GitHub communitySelect all that apply

    Which TWO are recommended community health files that make an open-source project more welcoming and clear? (Choose TWO)

    • AA README file describing the projectCorrect
    • BA CONTRIBUTING file explaining how to contributeCorrect
    • CA .DS_Store system file
    • DA compiled binary of the application
    ✓ Correct answer: A, B

    Both are community health files GitHub recognises and surfaces. The README tells a visitor what the project is and how to use it - the first thing anyone reads. CONTRIBUTING tells a would-be contributor how to propose a change, which is what turns interest into a usable pull request rather than one that has to be rejected on process grounds.

    Why the other options are wrong
    • CA .DS_Store is macOS folder metadata committed by accident. It belongs in .gitignore, not in the repository.
    • DA compiled binary is build output. It bloats history and should be published as a release asset instead.
  5. Question 5Work with GitHub repositories

    When searching issues and pull requests, what does the qualifier 'is:open' do?

    • ALimits results to public repositories only
    • BOpens each matching issue in a new browser tab
    • CLimits results to issues or pull requests that are currently openCorrect
    • DReopens any closed issues that match
    ✓ Correct answer: C

    Search qualifiers narrow a result set by attribute rather than by text, and this one restricts results to items that are currently open, which is what makes a large backlog navigable. Qualifiers combine, so open items can be filtered further by author, label, assignee or age, and that combination is how a saved search becomes a working queue.

    Why the other options are wrong
    • ALimiting results to public repositories is what a visibility qualifier does, not a state one.
    • BA search qualifier filters the result list and opens no browser tab.
    • DThe qualifier reads the state of each item and reopens nothing.
  6. Question 6Apply modern development practices

    What is the primary benefit of using GitHub Actions for continuous integration?

    • AIt converts a repository from private to public automatically
    • BIt automatically builds and tests code on every changeCorrect
    • CIt permanently encrypts all source code in the repository
    • DIt replaces the need for a version control system entirely
    ✓ Correct answer: B

    The primary benefit for continuous integration is that every change is built and tested automatically, so a break is attributed to the change that caused it rather than discovered later in a batch. Consistency matters as much as automation: the same steps run in the same environment every time, which removes the argument about whether it works on the machine of whoever wrote it.

    Why the other options are wrong
    • ANothing about continuous integration converts a repository from private to public.
    • CActions does not encrypt source code; it builds and tests what is already there.
    • DContinuous integration runs on top of version control rather than replacing it.
  7. Question 7Work with GitHub repositories

    On GitHub, what is a 'permalink' to a line of code most useful for?

    • AGranting temporary edit access to the file for anyone who clicks and opens the shared permalink
    • BAutomatically updating the link to show the newest version of that line as the file keeps changing
    • CSharing a link that always points to the exact file content at a specific commit, even after later changesCorrect
    • DDeleting the referenced line from the file for everyone who later opens that same permalink URL
    ✓ Correct answer: C

    When viewing a file, pressing 'y' (or selecting a line and using the permalink option) changes the URL to include the commit SHA. This guarantees the link continues to point to the same content even if the branch later changes, which is essential when referencing code in issues or discussions.

    Why the other options are wrong
    • AA permalink shares a view of code; it grants no edit access to anyone.
    • BA permalink pins to a commit specifically so it does not update to newer versions.
    • DA permalink is a stable reference; it never deletes the line it points to.
  8. Question 8Understand privacy, security, and administration

    How do an organization's base permissions apply to an outside collaborator?

    • AThey apply fully, since collaborators count as regular members
    • BThey do not apply, because collaborators are not org membersCorrect
    • CThey apply only to private repositories in the organization
    • DThey apply after the collaborator accepts a member invite
    ✓ Correct answer: B

    An outside collaborator is deliberately not part of the organization, so the organization's base permission does not apply to them. They receive only the specific access you grant on individual repositories. This keeps external contributors scoped to exactly the repositories they need.

    Why the other options are wrong
    • AOutside collaborators are not counted as members, so base permissions never reach them.
    • CThe base permission is bypassed entirely, not narrowed to private repositories.
    • DThere is no member invite step; collaborators stay outside the organization.
  9. Question 9Work with GitHub repositories

    A developer outside an organization wants to propose a change to a repository they cannot write to. The options are shown in the following table. Which should they do?

    • AFork the repositoryCorrect
    • BClone the repository
    • CCreate a branch in it
    • DDownload the ZIP
    ✓ Correct answer: A

    The constraint is having no write access, which is what makes forking the standard route for outside contribution. A fork creates a copy under your own account that you can push to freely, and a pull request from that fork proposes the change to the original. Cloning gives you the files locally and no ability to push back, since pushing still requires write access to the original. Creating a branch requires exactly the write access the developer does not have. Downloading an archive gives files with no git history and no path back at all.

    Why the other options are wrong
    • BA clone is local and pushing back still requires write access to the original.
    • CCreating a branch in the repository requires the write access they lack.
    • DAn archive has no git history and no route to propose changes.
  10. Question 10Understand Git and GitHub basics

    What is the relationship between GitHub Desktop and Git?

    • ADesktop is a graphical front end that performs Git operationsCorrect
    • BDesktop is a replacement for Git with its own history format
    • CDesktop is a hosting service that stores repositories remotely
    • DDesktop is an editor for writing code with no version control
    ✓ Correct answer: A

    GitHub Desktop presents Git operations through a graphical interface while the repository underneath remains an ordinary Git repository, which is why the same clone can be used from the command line interchangeably. It is not a separate system, so nothing is locked into it and moving between the two costs nothing.

    Why the other options are wrong
    • BDesktop uses ordinary Git repositories rather than a history format of its own.
    • CHosting repositories remotely is what the service does rather than the desktop client.
    • DDesktop manages version control rather than being a code editor without it.

Who this GitHub Foundations practice exam is for

This practice set is for anyone preparing for the GitHub Foundations exam at the foundational level - from first-time candidates building a foundation to experienced GitHub practitioners doing a final review before test day. If you learn best by working through realistic questions and reading why each answer is right or wrong, it is built for you.

How to use this GitHub Foundations practice exam

  1. Start with the free sample questions above to gauge your current baseline.
  2. Read the full explanation on every question, including why each wrong option is wrong.
  3. Track your weak domains and focus your study where you are losing the most marks.
  4. Once you are scoring consistently well, take a timed, full-length mock exam.
  5. Use your readiness score to decide when you are ready to book the real GitHub Foundations exam.

Related GitHub resources

GitHub Foundations practice exam FAQ

How many questions are in the GitHub Foundations practice exam on CertGrid?

CertGrid has 1,170 practice questions for GitHub Foundations, covering 7 exam domains. The real GitHub Foundations exam is ~60 qs in 100 min. CertGrid's timed mock is a fixed 60 questions.

What is the passing score for GitHub Foundations?

The GitHub Foundations exam passing score is 70%, and you have about 100 min to complete it. CertGrid scores your practice attempts the same way so you know when you are ready.

Are these official GitHub Foundations exam questions?

No. CertGrid is an independent practice platform. We do not provide real or leaked exam questions. Our questions are original and designed to help you practice the concepts, scenarios, and difficulty style of the GitHub Foundations exam.

Is there a free GitHub Foundations practice test?

Yes. You can take a free GitHub Foundations practice test straight away: a fixed set of 20 practice questions for this exam, retryable as often as you like, with no credit card required. You get readiness scoring and a weak-domain breakdown on those questions. Paid plans unlock the full 1,170-question bank, timed mock exams and full-bank domain analytics.

What CertGrid is (and is not)

CertGrid is an independent IT certification practice platform for Azure, AWS, Google, Cisco, Security, Linux, Kubernetes, Terraform, and other certification tracks. It provides objective-mapped practice questions, readiness scoring, weak-domain drills, and explanations to help learners understand what to study next.

Independent & original. CertGrid is an independent practice platform and is not affiliated with or endorsed by GitHub. Questions are original practice items designed to mirror certification concepts and exam style. CertGrid does not provide official exam questions or braindumps.