Practice Mode

GH-900

0/0 Loading...
of 0

GH-900 — 20 free practice questions

Preview the exam for free. Unlock all 126 questions →

Question 1

Which of the following keywords are used to link a pull request to an issue? (Choose three.)
  • A. fix Correct
  • B. resolves Correct
  • C. merge
  • D. join
  • E. closed Correct
  • F. connects

Explanation

GitHub links a pull request to an issue when its description or commit message uses one of the supported keywords: close, closes, closed, fix, fixes, fixed, resolve, resolves or resolved, followed by the issue reference. So fix, resolves and closed all work. Merge, join and connects are not recognized keywords and do not create a link.

Question 2

Which syntax is used for authoring saved replies?
  • A. HTML
  • B. YAML
  • C. Markup
  • D. Markdown Correct

Explanation

Saved replies are reusable comment text, and like other comments on GitHub they are written in GitHub Flavored Markdown. The documentation for creating a saved reply points to the Markdown basic writing and formatting syntax. HTML is not the authoring syntax, YAML is used for configuration files such as workflows and issue forms, and Markup is not a GitHub authoring syntax.

Question 3

As a user, what feature can you use to merge proposed changes in a repository on GitHub?
  • A. discussions
  • B. projects
  • C. pull requests Correct
  • D. issues

Explanation

A pull request proposes changes from one branch to another, lets collaborators review them, and is where the changes are merged. Discussions are for conversations, projects are for planning and tracking work, and issues track bugs, tasks and ideas; none of them merges code.

Question 4

If there are multiple README files, which of the following locations will be displayed first?
  • A. docs
  • B. root
  • C. src
  • D. .github Correct

Explanation

When a repository contains more than one README, GitHub picks the one to display in this order: the .github directory, then the repository's root directory, and finally the docs directory. So a README in .github takes precedence over one in the root. A README in src is not surfaced on the repository's main page at all.

Question 5

Why is branching a core concept in Git?
  • A. Branching helps in automatically merging changes from different branches into the main branch.
  • B. Branching creates physical copies of the project on disk, ensuring data redundancy and backup.
  • C. Branching creates an isolated environment to try new ideas and make changes without affecting other branches. Correct
  • D. Branching is necessary for organizing files and folders within a Git repository.

Explanation

A branch lets you develop features, fix bugs or experiment in isolation, so work on one branch does not affect the default branch or others until it is merged. Branches do not merge automatically, they are lightweight pointers to commits rather than physical copies of the project, and they are not how files and folders are organized.

Question 6

What is the difference between Git and GitHub?
  • A. Git is a command-line tool for tracking file changes, while GitHub is a platform for collaborating on Git repositories. Correct
  • B. Git and GitHub are different names for the same tool that is used for version control and collaboration.
  • C. Git is a cloud-based hosting service, while GitHub is a distributed version control system.
  • D. Git is a centralized version control system, while GitHub is a cloud-based collaboration platform.

Explanation

Git is a distributed version control system, used mainly from the command line, that tracks changes to files. GitHub is a cloud platform that hosts Git repositories and adds collaboration features such as pull requests, issues and Actions. They are not the same tool, option C reverses the roles, and Git is distributed rather than centralized.

Question 7

What type of operations has Git been optimized for?
  • A. local file manipulation and offline work Correct
  • B. remote collaboration and real-time editing
  • C. cloud-based operations and synchronization
  • D. web development and browser-based coding

Explanation

Git is distributed: every clone holds the full repository history, so committing, branching, viewing history and diffing all happen locally and work offline. Git has no real-time co-editing, is not a cloud service, and is not tied to web or browser-based development.

Question 8

Which version control system is GitHub built on top of?
  • A. Subversion
  • B. Mercurial
  • C. Git Correct
  • D. Perforce

Explanation

GitHub is a hosting and collaboration platform for Git repositories, so it is built on Git. Subversion, Mercurial and Perforce are other version control systems that GitHub does not use as its underlying system.

Question 9

What command should you type to create and switch over to a new branch?
  • A. git checkout -n newBranchName
  • B. git checkout -b newBranchName Correct
  • C. git checkout newBranchName
  • D. git branch newBranchName

Explanation

git checkout -b newBranchName creates the branch and checks it out in a single step (git switch -c does the same in newer Git versions). git branch newBranchName only creates the branch and leaves you on the current one. git checkout newBranchName switches to a branch that already exists, and -n is not a branch-creation option of git checkout.

Question 10

The difference between GitHub Enterprise Server (GHES) and GitHub Enterprise Cloud is that GHES:
  • A. includes authentication with SAML single sign-on and access provisioning with SAML or SCIM.
  • B. can be deployed on both Windows and Linux.
  • C. cannot enable rate limiting.
  • D. is a self-hosted solution that allows organizations to have full control over their infrastructure. Correct

Explanation

GitHub Enterprise Server is self-hosted: the organization runs the appliance in its own data center or cloud account and controls the infrastructure, while GitHub Enterprise Cloud is hosted by GitHub. SAML single sign-on and SCIM provisioning are available on both, so they are not a difference. GHES runs as a virtual appliance on supported hypervisors and cloud platforms rather than being installed on Windows or Linux, and administrators can configure rate limits on GHES.

Question 11

How can a user resume an existing Codespace that is bound to a repository? (Choose two.)
  • A. Browse to the repository in GitHub.com and press the period “.” key.
  • B. Use the git CLI with the codespace parameter (e.g., "git codespace code -web").
  • C. Open https://github.com/codespaces in the browser, select the repository, and then select the existing Codespace. Correct
  • D. Browse to the repository in GitHub.com, press the comma “,” key and select Resume this codespace. Correct

Explanation

The github.com/codespaces page lists all your active and stopped codespaces, and selecting one reopens it. On a repository page, pressing the comma key opens the Resume codespace page, where Resume this codespace reopens your most recent codespace for that branch. Pressing the period key opens the github.dev web editor, not a codespace, and codespaces are managed with the GitHub CLI (gh codespace), not a git codespace command.

Question 12

How are issues and pull requests used?
  • A. Issues are used to push bug fixes to the repository; whereas, pull requests are used to collaborate around proposed changes made to a branch.
  • B. Issues are used to push bug fixes to the repository; whereas, pull requests are used to collaborate around proposed changes made to Projects.
  • C. Issues are used to track ideas, document feedback, and share information; whereas, pull requests are used to collaborate around proposed changes made to a branch. Correct
  • D. Issues are used to track ideas, document feedback, and share information; whereas, pull requests are used to collaborate around changes made to Projects.

Explanation

Issues track ideas, feedback, tasks and bugs, and are a place to discuss and share information; they do not push any code. Pull requests propose the changes made on a branch so collaborators can review and discuss them before they are merged. Projects are planning boards that organize issues and pull requests, not something pull requests change.

Question 13

Where can a user manually link a pull request to an issue?
  • A. in the right sidebar of the pull request, under “Assignees”
  • B. in the right sidebar of the pull request, under “Development” Correct
  • C. in the comment section of the issue
  • D. in the description of the issue

Explanation

The Development section in the right sidebar of a pull request (and of an issue) lets you manually link a pull request to an issue. Assignees only sets who is responsible for the work. Mentioning a pull request in an issue comment or description creates a cross-reference, not a linked pull request; automatic linking uses closing keywords in the pull request description.

Question 14

Which of the following is always true about the feature preview phases Alpha and Beta?
  • A. Alpha features are not available to the public. Correct
  • B. Beta features provide technical support.
  • C. Alpha and Beta features offer Service Level Agreements (SLAs).
  • D. Alpha features are documented.

Explanation

Alpha (now called private preview) features are offered only to a limited set of users for demonstration and testing, so they are not available to the public. Neither alpha nor beta (public preview) features carry SLAs or technical support obligations; those apply only at general availability. Alpha features may lack documentation, so documentation is not guaranteed.

Question 15

Which GitHub tool or feature is best to quickly modify a batch of files in a repository?
  • A. Use github.dev from a web browser. Correct
  • B. Install and use the git CLI.
  • C. Create and use a new GitHub Codespace.
  • D. Install and use GitHub Desktop.
  • E. Install and use GitHub Mobile.

Explanation

github.dev opens the repository in a browser-based VS Code editor instantly (press the period key on any repository page), with no installation or configuration, and lets you edit many files, stage them all and commit them together. GitHub Desktop and the git CLI must be installed and the repository cloned first, which is not the quickest path. A codespace can take a few minutes to create because it provisions a virtual machine for building and running code, and GitHub Mobile is not designed for editing files.

Question 16

When making comments in GitHub, the supported text language is:
  • A. JSON.
  • B. Markdown. Correct
  • C. JavaScript.
  • D. XML.
  • E. CSS.

Explanation

GitHub comments, issues, pull request descriptions and wikis are written in GitHub Flavored Markdown, which supports headings, lists, links, code blocks, mentions and more. JSON, JavaScript, XML and CSS can appear inside a fenced code block, but they are not the formatting language of comments.

Question 17

Without using advanced search syntax, what are some of the available default filters when searching through issues? (Choose two.)
  • A. your project
  • B. everything assigned to your team
  • C. your issues Correct
  • D. everything you have commented on
  • E. everything assigned to you Correct

Explanation

The issues list offers built-in default filters so you can narrow results without typing search qualifiers: open issues and pull requests, those you created (your issues), those assigned to you, and those where you are @mentioned. There is no default filter for a project, for items assigned to your team, or for items you commented on; those need qualifiers such as project:, team: or commenter:.

Question 18

What are achievements on a GitHub user profile?
  • A. total number of repositories owned
  • B. number of stars received on repositories
  • C. special recognition for significant contributions and milestones Correct
  • D. virtual trophies awarded for completing coding challenges

Explanation

Achievements are badges shown on a GitHub profile that recognize particular actions and milestones on GitHub, such as merging pull requests, co-authoring commits or contributing to projects. They are not counts of repositories or stars, which appear elsewhere on the profile, and they are not awarded for completing coding challenges.

Question 19

Which of the following is the best description of a Git commit?
  • A. a snapshot of the entire repository at a specific point in time, capturing the state of all files in the project Correct
  • B. a record of the most recent changes made by a developer in Git
  • C. a series of changes made to a file, or set of files, in Git
  • D. a log message that describes the purpose of the changes made to the files in a Git repository

Explanation

Git records history as snapshots in time called commits: each commit captures the state of all tracked files in the project at that moment, like taking a photo. A commit is not just the latest changes or a series of changes, and the commit message is only one part of a commit that describes it.

Question 20

What qualifier finds issues that mention a certain user?
  • A. threads:
  • B. mentions: Correct
  • C. mentioned:
  • D. @mentioned:

Explanation

The mentions: qualifier finds issues that mention a certain user, for example mentions:defunkt. GitHub search has no threads:, mentioned: or @mentioned: qualifier. The related involves: qualifier is broader, matching the author, assignee, mentions or commenter.

Verifying access...