GitHub Foundations (GH-900) · Domain 2 · 14% of exam

Work with GitHub repositories

Drill 19 practice questions focused entirely on Work with GitHub repositories for the GitHub GH-900 exam. Tap an answer for instant feedback and a full explanation — no sign-up, always free.

Verified answer19 questions
Question 1 of 19

A project manager has a folder of finished design assets on her laptop and wants to add them to an existing GitHub repository. She is not comfortable using the command line or installing Git tooling. What is the simplest way for her to add these files directly through the GitHub web interface?

Reviewed for accuracy · Report an issue
Question 2 of 19

A technical writer needs to add a new file named docs/setup.md to a repository directly on GitHub.com. They do not have Git installed and want to create the file, place it in the docs folder, and commit it entirely through the browser. Which approach lets them accomplish this?

Reviewed for accuracy · Report an issue
Question 3 of 19

A maintainer needs to make several experimental changes to a documentation site over the next week. The main branch is used for automatic production deployments and must always remain stable and releasable. What is the recommended way to organize this work so production is never disrupted while the changes are in progress?

Reviewed for accuracy · Report an issue
Question 4 of 19

Your team wants pull requests that modify files in the /api directory to automatically request a review from the backend team, while changes to the /docs directory should request the documentation team. Which repository file should you configure to achieve this automatic reviewer assignment?

Reviewed for accuracy · Report an issue
Question 5 of 19

Your team maintains a public repository. A new maintainer asks where in the repository they should document the supported versions and the process external researchers should follow to privately report a discovered vulnerability. Which file should hold this information?

Reviewed for accuracy · Report an issue
Question 6 of 19

An open-source project maintainer notices that many first-time contributors are opening pull requests that don't follow the project's coding style, skip required tests, and use inconsistent commit formats. The maintainer wants a single file in the repository that clearly documents how people should contribute so this guidance appears automatically when someone opens a pull request or issue. Which file should the maintainer add?

Reviewed for accuracy · Report an issue
Question 7 of 19

A development team practices regular repository maintenance. After a feature branch's pull request has been reviewed, approved, and merged into main, the team lead wants to keep the branch list tidy and reduce clutter for other contributors. What is the recommended maintenance action to take with the merged feature branch?

Reviewed for accuracy · Report an issue
Question 8 of 19

You maintain a Node.js project on GitHub and want to see which open-source packages your repository depends on, along with alerts when any of them contain known security vulnerabilities. Which repository feature should you use?

Reviewed for accuracy · Report an issue
Question 9 of 19

A developer at your company hears that GitHub is testing a new user interface for the notifications inbox. They want to try this new functionality on their personal account before it becomes generally available, without affecting other users. Which GitHub capability should they use?

Reviewed for accuracy · Report an issue
Question 10 of 19

A developer on your team keeps accidentally committing the local 'node_modules/' folder and compiled '.log' files to the shared repository, cluttering pull requests. You want Git to automatically skip these paths so they are never staged or committed. Which file should you add to the repository to accomplish this?

Reviewed for accuracy · Report an issue
Question 11 of 19

Your team is publishing an internal tool as a public repository so external developers can freely use and modify it. A reviewer notes that without a specific file, others may be legally unsure whether they are allowed to reuse the code. Which repository file should you add to clearly define how others may use, modify, and distribute the project?

Reviewed for accuracy · Report an issue
Question 12 of 19

A developer publishes a new open-source utility and wants first-time visitors landing on the repository page to immediately understand what the project does, how to install it, and how to run it. Which repository file should the developer prioritize creating so this information appears automatically on the repository's main page?

Reviewed for accuracy · Report an issue
Question 13 of 19

Your team has finished testing version 2.0 of a command-line tool. You want to publish a permanent, named snapshot of the code at this point, attach the compiled binary files for users to download, and include notes describing what changed. Which GitHub repository feature should you use?

Reviewed for accuracy · Report an issue
Question 14 of 19

A team lead is standardizing repository conventions across the organization. One older repository still uses 'master' as its default branch, and the team wants to rename it to 'main' while keeping all history, open pull requests, and existing collaborators intact. What is the recommended way to accomplish this on GitHub?

Reviewed for accuracy · Report an issue
Question 15 of 19

You are a project maintainer who wants to prepare a quarterly report showing how many commits each team member made, along with overall commit frequency and code addition/deletion trends over the last three months. Where in the GitHub repository interface should you look to find this information?

Reviewed for accuracy · Report an issue
Question 16 of 19

Your team creates several new microservice repositories each quarter. Every new repo must start with the same folder layout, a standard README skeleton, a preconfigured .gitignore, and an issue template. Developers currently copy these files manually, which leads to inconsistencies. Which GitHub feature should the team use to ensure every new repository starts with this exact baseline automatically?

Reviewed for accuracy · Report an issue
Question 17 of 19

A maintainer of a popular open-source project wants outside researchers to know how to privately report a discovered security vulnerability, rather than opening a public issue that could expose users to attacks. Which repository file should the maintainer add to communicate this reporting process?

Reviewed for accuracy · Report an issue
Question 18 of 19

A developer discovers an open-source library they may want to use in a future project. They want to bookmark it so they can easily find it again from their profile and signal appreciation to the maintainers, without forking or copying any code. Which GitHub feature should they use?

Reviewed for accuracy · Report an issue
Question 19 of 19

You maintain an open-source library and want to understand how popular your repository is by seeing how many unique visitors viewed it, which referring sites sent people to it, and how many times it was cloned over the last two weeks. Which part of the repository should you open to find this data?

Reviewed for accuracy · Report an issue

More GH-900 practice

Keep going with the other GitHub Foundations (GH-900) domains, or take a full timed mock exam.

← Back to GH-900 overview