GH-900 Sample Questions

GH-900 Sample Questions & Answers

Collaborating on GitHub and using its project management tools carries the most weight, alongside learning Git and finding your way around GitHub, repository settings and files, DevOps practices and code review, security administration, and the community.

Launch the full GH-900 simulator →

Showing 8 of 17 free samples.

  1. Question 1Intermediate

    Introduction to Git and GitHub · Navigate GitHub

    A user needs to authenticate Git operations with GitHub using HTTPS but has Two-Factor Authentication (2FA) enabled on their account.

    What credential must they use in place of their account password when prompted by the command line?

    Show answer & explanation

    Correct answer: C

    When 2FA is enabled, basic password authentication is disabled for Git over HTTPS. Users must generate and use a Personal Access Token (PAT) with the appropriate scopes (like repo) as their password. Alternatively, they could use SSH keys or the Git Credential Manager.

  2. Question 2Advanced

    Introduction to Git and GitHub · Work with Git commands

    You are working on a feature branch and want to incorporate the latest changes from the main branch into your work to ensure compatibility. You want to maintain a linear history without creating an extra merge commit.

    Which command should you use?

    Show answer & explanation

    Correct answer: C

    git rebase main rewrites the project history by creating new commits for each commit in the original branch, placing them after the last commit of the main branch. This creates a linear history, unlike git merge, which creates a special merge commit that ties the two histories together.

  3. Question 3Beginner

    Introduction to Git and GitHub · Navigate GitHub

    Which of the following files is ESSENTIAL for excluding specific local files, such as build artifacts or environment secrets, from being tracked by Git?

    Show answer & explanation

    Correct answer: A

    The .gitignore file specifies intentionally untracked files that Git should ignore. Files already tracked by Git are not affected; it prevents new files (like log files, binaries, or .env files) from being accidentally staged and committed.

  4. Question 4IntermediateSelect 2

    Introduction to Git and GitHub · Navigate GitHub

    Select TWO valid reasons for 'forking' a repository instead of 'cloning' it in the GitHub ecosystem. (Select TWO)

    Show answer & explanation

    Correct answers: C, D

    Forking is also used to take an existing project and diverge it into a new, separate project (often called a 'hard fork') that you manage independently.

    Forking creates a personal copy of the repository on your GitHub account. This is essential for contributing to open-source projects where you lack permission to push directly to the original (upstream) repository.

  5. Question 5Beginner

    Introduction to Git and GitHub · Navigate GitHub

    You want to create a rich-text document for your repository's landing page that includes headers, links, and code blocks.

    What file format should you use for the README file to ensure it renders correctly on GitHub?

    Show answer & explanation

    Correct answer: C

    GitHub flavored Markdown (.md) is the standard format for documentation on GitHub. It allows for lightweight formatting that renders directly in the GitHub UI, including the repository root README.

  6. Question 6Advanced

    Introduction to Git and GitHub · Understand the basics of Git

    A team member has left the organization. You need to ensure they can no longer access the private repositories they cloned to their personal laptop.

    Which statement accurately reflects the distributed nature of Git in this security scenario?

    Show answer & explanation

    Correct answer: B

    Because Git is distributed, a 'clone' is a full local copy. Revoking server access only prevents future synchronization (push/pull). It cannot delete data already stored on a user's local machine. This is a critical security consideration for distributed version control.

  7. Question 7Beginner

    Introduction to Git and GitHub · Understand the basics of Git

    True or False: The .git directory located in the root of your project contains all the necessary metadata, logs, and object database for the repository, and deleting it will remove the project's version control history.

    Show answer & explanation

    Correct answer: A

    The .git hidden folder is the repository. It contains the config, hooks, objects (commits, trees, blobs), and refs (heads, tags). If you delete this folder, the directory becomes a standard folder with no version history.

  8. Question 8Intermediate

    Introduction to Git and GitHub · Work with Git commands

    You need to download the latest commits from the remote repository to your local machine to check what has changed, but you do NOT want to merge those changes into your current working branch yet.

    Which command satisfies this requirement?

    Show answer & explanation

    Correct answer: D

    git fetch downloads objects and refs from another repository (remote) but does not integrate any of the downloaded data into your working files. This allows you to inspect changes before merging them.

Ready for the real thing?

The full GH-900 simulator has every exam-style question, timed mode, and instant scoring.

Go to the GH-900 simulator →