10 free GitHub GH-900 Foundations practice questions with the correct answer and a full explanation for each, taken from the CertStash pack of 142 questions. Work through them, then open each answer to check your reasoning.
Get all 142 questions (US$39) · Download these 10 as a PDF
Question 1
Which of the following keywords are used to link a pull request to an issue? (Choose three.)
Show answer and explanation
Correct answer: A, B, E
A. fix B. resolves E. closed GitHub supports a fixed set of keywords that link a pull request to an issue and close that issue when the pull request merges into the default branch. Those keywords are close, closes, closed, fix, fixes, fixed, and resolve, resolves, resolved. From the list given, fix, resolves, and closed are all valid forms, so they are the three correct choices.
Why the other options are wrong
- C. Merge describes combining branches and is not a recognized linking keyword.
- D. Join is not a GitHub linking keyword.
- F. Connects is not a GitHub linking keyword, so it creates no automatic issue link.
Question 2
Which syntax is used for authoring saved replies?
Show answer and explanation
Correct answer: D. Markdown
GitHub saved replies are authored using Markdown syntax. This allows users to format text with headers, lists, code blocks, links, and other formatting elements when creating reusable response templates for issues and pull requests.
Why the other options are wrong
- A. HTML is not used for authoring saved replies on GitHub.
- B. YAML is a configuration language, not the syntax for composing saved replies.
- C. Markup is a general term, but GitHub specifically uses Markdown for saved replies.
Question 3
As a user, what feature can you use to merge proposed changes in a repository on GitHub?
Show answer and explanation
Correct answer: C. pull requests
Pull requests are the GitHub feature designed to propose, review, and merge changes into a repository. They allow users to suggest modifications, discuss them with collaborators, and ultimately merge the proposed changes into the target branch through a formal review process.
Why the other options are wrong
- A. Discussions are for collaborative conversations, not for merging code changes.
- B. Projects are for organizing and tracking work items, not for merging changes.
- D. Issues are for tracking bugs and features, not for merging code directly.
Question 4
If there are multiple README files, which of the following locations will be displayed first?
Show answer and explanation
Correct answer: D. .gitHub
GitHub looks for README files in a documented order of precedence: the .github directory first, then the repository root, then the docs directory. Because .github is checked first, a README placed there is the one rendered on the repository's main page when several READMEs exist.
Why the other options are wrong
- A. A README in docs is last in the precedence order and is only shown when no .github or root README exists.
- B. A README in the root is shown only when the .github directory does not contain one.
- C. The src directory is not part of the README precedence order, so a README there is never selected for display.
Question 5
Why is branching a core concept in Git?
Show answer and explanation
Correct answer: C. Branching creates an isolated environment to try new ideas and make changes without affecting other branches.
ideas and make changes without affecting other branches. Branching is a core Git concept because it creates an isolated environment where developers can experiment with new ideas and make changes without affecting other branches or the main codebase. This allows parallel development, feature isolation, and safe experimentation, which is fundamental to Git's collaborative workflow.
Why the other options are wrong
- A. Branching does not automatically merge changes; merging is a separate, manual operation.
- B. Branches are not physical copies on disk; they are pointers to commits and do not create data redundancy.
- D. Branching is for version control and parallel development, not for organizing files and folders.
Question 6
What is the difference between Git and GitHub?
Show answer and explanation
Correct answer: A. Git is a command-line tool for tracking file changes, while GitHub is a platform for collaborating on Git repositories.
while GitHub is a platform for collaborating on Git repositories. Git is a distributed version control system implemented as a command-line tool for tracking file changes and managing version history locally. GitHub is a web-based platform built on top of Git that provides repository hosting, collaboration features, issue tracking, pull requests, and social features for teams working together on Git repositories.
Why the other options are wrong
- B. Git and GitHub are distinct tools with different purposes and functionality.
- C. This reverses the definitions; Git is the version control system and GitHub is the cloud platform.
- D. Git is distributed, not centralized, and GitHub is a web platform, not a version control system itself.
Question 7
What type of operations has Git been optimized for?
Show answer and explanation
Correct answer: A. local file manipulation and offline work
Git has been optimized for local file manipulation and offline work. It is a distributed version control system where each repository is a complete, self-contained copy, allowing developers to work independently offline, make commits locally, and synchronize changes when connectivity is available. This makes Git efficient for individual and decentralized workflows.
Why the other options are wrong
- B. Git is not optimized for real-time editing; it is designed around snapshots and commits.
- C. Git is not primarily cloud-based; it is a local-first distributed system.
- D. Git is a general-purpose version control system, not specifically optimized for web development.
Question 8
Which version control system is GitHub built on top of?
Show answer and explanation
Correct answer: C. Git
GitHub is built on top of Git, the distributed version control system. GitHub provides a web- based interface and collaboration platform for Git repositories, but Git is the underlying version control technology that powers it.
Why the other options are wrong
- A. Subversion is a different version control system, not what GitHub is built upon.
- B. Mercurial is an alternative version control system, not the foundation of GitHub.
- D. Perforce is a version control system, but GitHub is not built on it.
Question 9
What command should you type to create and switch over to a new branch?
Show answer and explanation
Correct answer: B. git checkout -b newBranchName
The command `git checkout -b newBranchName` creates a new branch and immediately switches to it in one operation. The `-b` flag specifically instructs Git to create the branch before checking it out. This is the standard and most efficient method for creating and switching to a new branch simultaneously.
Why the other options are wrong
- A. The `-n` flag is not a valid Git option for creating branches.
- C. This command only switches to an existing branch; it does not create a new one.
- D. This command creates a new branch but does not switch to it automatically.
Question 10
The difference between GitHub Enterprise Server (GHES) and GitHub Enterprise Cloud is that GHES:
Show answer and explanation
Correct answer: D. is a self-hosted solution that allows organizations to have full control over their infrastructure.
have full control over their infrastructure. GitHub Enterprise Server is the self-hosted deployment of GitHub, run as a virtual appliance on infrastructure the organization owns and manages. That gives the organization full control over hosting, data location, upgrades, and network boundaries. GitHub Enterprise Cloud, by contrast, is hosted and operated by GitHub as a service.
Why the other options are wrong
- A. SAML single sign-on with SAML or SCIM access provisioning is described as a GitHub Enterprise Cloud capability, so it does not define GitHub Enterprise Server.
- B. GitHub Enterprise Server ships as a virtual appliance for supported hypervisors and cloud platforms, not as an application installed on Windows and Linux.
- C. Rate limiting can be configured on GitHub Enterprise Server, so the statement is false.
That was 10 of 142.
The full GitHub GH-900 Foundations pack has all 142 questions, each with the answer, the explanation and why the other options are wrong, plus a questions-only copy for timed runs. US$39, paid once, with free monthly updates and a pass-or-your-money-back guarantee.
