GH-900 Practice Test Questions

74 Questions


Which of the following best describes a Codespace?


A. A lightweight editing experience that runs entirely in your browser


B. An AI pair programmer that offers autocomplete-style suggestions


C. A development environment hosted in the cloud


D. A Visual Studio Code plug-in to manage local devcontainers





C.
  A development environment hosted in the cloud

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."

What are the two main reasons why one might fork a repository?

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


A. To create an issue or open a discussion


B. To propose changes to the base repository


C. To create a new repository based on an existing one


D. To create a new branch to develop a new feature





B.
  To propose changes to the base repository

C.
  To create a new repository based on an existing one

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.

Which of the following are displayed in the "Pinned Repositories" section of a GitHub user profile?


A. Repositories with the most recent activity


B. Repositories that were personally selected to be highlighted


C. Repositories that are owned by organizations in which the user is a member


D. Repositories with the highest number of stars





B.
   Repositories that were personally selected to be highlighted

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.

Which of the following can be performed within GitHub Desktop?


A. Creating and managing issues


B. Reviewing and approving pull requests


C. Adding and cloning repositories


D. Commenting on discussions


E. Integrating with office suite software





C.
  Adding and cloning repositories

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.

Which of the following are available statuses of a pull request?

(Each answer presents a complete solution. Choose four


A. Draft


B. Closed


C. Rebasing


D. Merged


E. Modified


F. Open





A.
  Draft

B.
  Closed

D.
  Merged

F.
  Open

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.

What folder is the definition files stored in when creating custom issue forms?


A. .issues


B. .issues/ISSUE_TEMPLATE


C. .github/ISSUE_TEMPLATE


D. .GitHub





C.
  .github/ISSUE_TEMPLATE

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."

Which of the following best describes GitHub Pages?


A. Webpages hosted and published through GitHub repositories


B. Handles pagination for API requests


C. Hosts long-form documentation about your project


D. Curated guides around how to use GitHub products





A.
  Webpages hosted and published through GitHub repositories

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..."

Which of the following best describes cloning a repository?


A. It creates a copy of the repository on GitHub.com.


B. It retrieves code updates from the remote repository.


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


D. It imports your source code into a new repository.





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

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.

Which of the following GitHub syntax formats is consistent with the associated text?


A. * This is a heading


B. This is a link


C.


D. This is bolded text


E. 1. This is an ordered list





C.
  

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**.

Who can be assigned to an Issue or pull request?

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


A. Anyone who has an enterprise GitHub account


B. Anyone who has commented on the Issue or pull request


C. Anyone who has a personal GitHub account


D. Anyone with write permissions to the repository





B.
  Anyone who has commented on the Issue or pull request

D.
  Anyone with write permissions to the repository

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.

The difference between GitHub Desktop and github.com is that Desktop:


A. Is a standalone software application.


B. Enables integration with office suite applications


C. Is only available on Windows operating systems.


D. Offers a graphical user interface.


E. Is a self-hosted version of GitHub.





D.
  Offers a graphical user interface.

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.

Which of the following is the best GitHub feature for long-form documentation for a project?


A. Insights


B. Pull Requests


C. Projects


D. Wikis





D.
  Wikis

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.


Page 1 out of 7 Pages