50 GitHub Foundations Practice Questions: Question Bank 2025
Build your exam confidence with our curated bank of 50 practice questions for the GitHub Foundations certification. Each question includes detailed explanations to help you understand the concepts deeply.
Question Banks Available
Current Selection
Extended Practice
Extended Practice
Why Use Our 50 Question Bank?
Strategically designed questions to maximize your exam preparation
50 Questions
A comprehensive set of practice questions covering key exam topics
All Domains Covered
Questions distributed across all exam objectives and domains
Mixed Difficulty
Easy, medium, and hard questions to test all skill levels
Detailed Explanations
Learn from comprehensive explanations for each answer
Practice Questions
50 practice questions for GitHub Foundations
A new developer wants to contribute a small documentation fix to an open-source project they do not have write access to. What is the recommended GitHub workflow to propose the change?
In Git, what is the primary purpose of a commit?
A team wants to ensure every change to the main branch is reviewed and tested before merging. Which GitHub feature best supports this requirement?
You want GitHub to automatically request reviews from specific people whenever certain files (for example, /infra/ or /security/) are changed in a pull request. What should you configure?
A developer cloned a repository, created a new branch, committed changes, and ran `git push`. Git returns an error indicating no upstream branch is configured. What is the most appropriate next step?
A repository receives frequent bug reports and feature requests. The maintainers want a consistent structure so reporters provide required details (steps to reproduce, expected behavior). Which GitHub feature should they use?
A team uses GitHub Actions to run tests. They want the test workflow to execute automatically whenever a pull request is opened or updated against the default branch. Which workflow trigger should they use?
Your organization wants to enforce two-factor authentication (2FA) for all members to reduce account takeover risk. Where is this typically enforced in GitHub?
A company stores a personal access token (PAT) in a GitHub Actions workflow file and accidentally commits it to the repository. What is the best immediate remediation action?
A repository uses branch protection rules requiring passing status checks before merging. A pull request shows the check as “Expected — Waiting for status to be reported” and cannot be merged. What is the most likely cause?
You want to prevent new team members from accidentally pushing commits directly to the default branch in a GitHub repository. What is the recommended approach?
A new contributor wants to propose changes to an open-source project without being granted write access to the main repository. Which GitHub workflow should they use?
In Git, what is the primary purpose of a commit?
A team wants every pull request to run a build and unit tests automatically and show the result in the pull request before merging. Which GitHub feature should they use?
You maintain a repository with many issues. You want to automatically close issues when a pull request is merged, without manually updating each issue. What is the best built-in approach?
A repository uses protected branches and requires at least one approving review before merging. A developer says they approved their own pull request but the merge button is still blocked. What is the most likely explanation?
You need to ensure that only designated maintainers automatically get requested for review when certain files (for example, "infra/*") change in a pull request. Which GitHub capability is designed for this?
A developer cloned a repository, created a new branch, committed changes, and tried to push. They received an error that the remote contains work they do not have locally. What should they do first to resolve this safely?
An organization wants to enforce single sign-on (SSO) for access to its GitHub resources and centrally manage membership using an external identity provider. Which GitHub account type and feature set best supports this requirement?
A security team requires that every merged pull request includes evidence that a vulnerability scan completed successfully and cannot be bypassed by merging without checks. Which combination of GitHub capabilities best meets this requirement?
You want to download a GitHub repository to your computer and keep it linked so you can pull future changes and push your own commits. What should you do?
A new contributor asks why their commit history looks different after running a command that combined multiple commits into one before opening a pull request. Which Git operation most likely caused this?
Your team wants to reduce notification noise but still ensure the right people review changes to specific paths (for example, /infra or /security). Which GitHub feature best supports this?
A repository uses a protected main branch. A developer tries to push directly to main and receives a rejection message. What is the most likely intended workflow?
A maintainer wants to keep a long-lived feature branch up to date with the latest changes from main, but they want to avoid introducing an extra merge commit in the feature branch history. Which approach best matches that goal?
A team wants pull requests to automatically show whether the code builds and tests pass before a reviewer approves. What GitHub capability supports this requirement?
You want to grant a contractor access to a single repository in an organization without giving them organization-wide membership. What is the best approach?
A contributor opens a pull request and sees that their changes include an unrelated commit that they did not intend to submit. What is a common cause of this issue?
A repository needs to store large binary design files that change frequently. The team wants to avoid bloating the Git history while still versioning the files. What is the recommended GitHub-related approach?
A project maintainer wants to encourage consistent bug reports by prompting users for required information (steps to reproduce, expected behavior, logs). Which feature best addresses this?
You created a new local Git repository and committed changes. When you run `git push`, Git returns an error indicating there is no upstream branch configured. What should you do to fix this on the first push?
You want to keep certain configuration files in your working directory but ensure Git never tracks them in commits. Which file is the standard place to define these ignore rules for the repository?
Your team wants a lightweight way to provide consistent setup instructions (how to run tests, how to start the app) directly in the repository homepage. Which approach is recommended?
A repository owner wants to prevent accidental direct commits to the default branch and ensure all changes go through review. What GitHub feature should they configure?
You are reviewing a pull request and want to suggest an improvement that the author can apply with one click. Which review feature should you use?
A team wants automated checks to run on pull requests and prevent merging if tests fail. Which GitHub capability is typically used to implement these checks?
You maintain an open-source repository and want community Q&A and idea sharing that is not tied to a specific bug or code change. Which GitHub feature is the best fit?
A repository is becoming cluttered with many open issues. The team wants a structured way to require specific fields such as "Steps to reproduce" and "Expected behavior" when users create bug reports. What should they add?
Your organization requires that all approved changes are merged using a linear history and forbids merge commits on the default branch. Which pull request merge option should you enable and prefer?
A workflow in GitHub Actions needs to publish a package and must authenticate to GitHub without storing a long-lived personal access token. What is the recommended authentication approach?
You want to contribute a small fix to an open-source repository you don't have write access to. What is the recommended workflow on GitHub?
You are reviewing a pull request and want to suggest a small code change that the author can apply with one click. Which feature should you use?
A team wants contributors to follow a consistent structure when reporting bugs. What should they add to the repository?
Your organization wants to prevent accidental direct pushes to the default branch and require approvals before merging. Which GitHub feature should you configure?
A maintainer wants all pull requests to automatically request reviews from the correct team based on which files changed (for example, /infra/*). What should they use?
You need to keep a fork up to date with changes from the original (upstream) repository before opening a pull request. What is the best approach?
A repository has two long-lived branches: main and develop. The team wants pull requests to propose changes into develop first, and only promote to main for releases. Which GitHub setting best supports this workflow?
A team wants to ensure that every pull request has a clear summary, testing steps, and a link to an issue. They want this guidance to appear automatically when creating a PR. What should they add?
Your organization wants to require SAML single sign-on (SSO) to access organization resources on GitHub. Where is this configured?
A company wants all repositories in an organization to use the same baseline settings (for example, required issue templates, a default CODEOWNERS file, and community health files) when new repositories are created. What is the best GitHub-native approach?
Need more practice?
Expand your preparation with our larger question banks
GitHub Foundations 50 Practice Questions FAQs
GitHub Foundations is a professional certification from Microsoft Azure that validates expertise in github foundations technologies and concepts. The official exam code is AZURE-5.
Our 50 GitHub Foundations practice questions include a curated selection of exam-style questions covering key concepts from all exam domains. Each question includes detailed explanations to help you learn.
50 questions is a great starting point for GitHub Foundations preparation. For comprehensive coverage, we recommend also using our 100 and 200 question banks as you progress.
The 50 GitHub Foundations questions are organized by exam domain and include a mix of easy, medium, and hard questions to test your knowledge at different levels.
More Preparation Resources
Explore other ways to prepare for your certification