CertSafari

    Free GitHub Foundations (GH-900) Sample Questions

    35 free sample questions from our bank of 343+, covering every exam domain, with answers and detailed explanations. Updated August 2026.

    Domain 1: Understand Git and GitHub basics

    Subdomain 1.1: Version control fundamentals

    1.What is the primary purpose of a version control system?

    1. A.To generate executable programs from source code
    2. B.To record modifications to project files over time
    3. C.To configure server environments automatically
    4. D.To organize user stories and tasks in a project
    Show answer & explanation

    Correct answer: BTo record modifications to project files over time

    • A. Incorrect. Generating executable programs from source code is the role of a compiler or build system, not a version control system. VCS tools track changes to files rather than transforming code into runnable binaries.
    • B. Correct. A version control system's primary purpose is to track and record changes to files over time, enabling collaboration, history review, comparison of versions, and rollback to previous states if needed.
    • C. Incorrect. Configuring server environments automatically is typically handled by infrastructure-as-code or configuration management tools. While version control may store configuration files, it does not perform deployment or setup itself.
    • D. Incorrect. Organizing user stories and tasks is the function of project management tools (e.g., Jira, GitHub Projects). Version control can link to these items, but its primary purpose remains tracking file changes over time.

    Subdomain 1.1: Version control fundamentals

    2.What is a branch in Git?

    1. A.A static record of the project's entire history
    2. B.A reference that points to a commit and can move
    3. C.A list of every contributor to the repository
    4. D.A network address for remote connections
    Show answer & explanation

    Correct answer: BA reference that points to a commit and can move

    • A. Incorrect. A static record describes a snapshot or tag, not a branch. Branches are dynamic pointers that change as new commits are added.
    • B. Correct. A branch is a lightweight movable reference that points to a commit. It allows independent development and updates as new commits are made.
    • C. Incorrect. Contributors are people tracked separately in metadata, not related to branches. Branches organize development history.
    • D. Incorrect. A network address is a remote URL or host, not a branch. Branches exist within the Git commit history.

    Subdomain 1.1: Version control fundamentals

    3.Which command adds a file to the staging area?

    1. A.git commit file
    2. B.git add file
    3. C.git push file
    4. D.git stage file
    Show answer & explanation

    Correct answer: Bgit add file

    • A. Incorrect. The command 'git commit file' is used to commit staged changes to the repository, not to add files to the staging area.
    • B. Correct. The command 'git add file' is the standard Git command to add a file to the staging area (index), preparing it for the next commit.
    • C. Incorrect. The command 'git push file' is used to upload local repository content to a remote repository, not to stage files.
    • D. Incorrect. While 'git stage file' is an alias for 'git add file' in some configurations, it is not the standard or default command for staging files in Git.

    Subdomain 1.1: Version control fundamentals

    4.After completing a feature on a branch, you want to integrate it into the main branch. What is the typical Git command sequence?

    1. A.`git rebase main` on feature branch
    2. B.`git checkout main` & `git merge feature`
    3. C.`git push origin main` to remote
    4. D.`git fetch origin feature` from remote
    Show answer & explanation

    Correct answer: B`git checkout main` & `git merge feature`

    • A. Incorrect. `git rebase main` rewrites the feature branch's commits on top of the main branch, but it does not integrate the changes into main. It is typically used to clean up history before a merge, not as the integration step itself.
    • B. Correct. A common workflow is to switch to the main branch using `git checkout main` and then merge the feature branch with `git merge feature`. This integrates the completed feature into main.
    • C. Incorrect. `git push origin main` pushes the local main branch to the remote repository, but it does not integrate the feature branch into main. It is a synchronization command, not the integration step.
    • D. Incorrect. `git fetch origin feature` downloads updates from the remote feature branch, but it does not integrate them into main. It only updates remote-tracking references and leaves your local branches unchanged.

    Subdomain 1.1: Version control fundamentals

    5.You have an existing directory of code and want to start tracking it with Git. What command initializes a new local repository?

    1. A.git clone
    2. B.git checkout
    3. C.git init
    4. D.git start
    Show answer & explanation

    Correct answer: Cgit init

    • A. Incorrect. `git clone` copies an existing remote repository to your local machine. It is used to duplicate a repo, not to initialize a brand-new one in an existing directory.
    • B. Incorrect. `git checkout` is used to switch branches or restore working tree files. It does not create a new local repository.
    • C. Correct. `git init` creates a new Git repository in the current directory, initializing version control for your existing code. This is the command used to start tracking an existing codebase with Git.
    • D. Incorrect. `git start` is not a valid Git command. There is no such command in Git.

    Subdomain 1.1: Version control fundamentals

    6.To connect your local repository to a remote server like GitHub, you need to add a remote. Which command is correct?

    1. A.`git remote add origin <url>`
    2. B.`git push origin <url>`
    3. C.`git clone <url>`
    4. D.`git fetch origin`
    Show answer & explanation

    Correct answer: A`git remote add origin <url>`

    • A. Correct. The command `git remote add origin <url>` is used to add a remote repository named 'origin' with the specified URL to your local Git repository. This establishes the connection between your local and remote repositories, allowing you to push and fetch changes.
    • B. Incorrect. `git push origin <url>` is used to push local commits to an existing remote repository, but it does not add or configure a remote. The remote must already be set up for push to work.
    • C. Incorrect. `git clone <url>` creates a new local copy of an existing remote repository. It does not add a remote to an already existing local repository; it initializes a new repository with the remote already configured.
    • D. Incorrect. `git fetch origin` downloads objects and references from a remote named 'origin', but it assumes that remote already exists. It does not create or add the remote connection.

    Subdomain 1.2: Working with GitHub

    7.Which type of GitHub account is designed for businesses and allows managing multiple organizations?

    1. A.Personal account
    2. B.Enterprise account
    3. C.Organization account
    4. D.Education account
    Show answer & explanation

    Correct answer: BEnterprise account

    • A. Incorrect. A Personal account is for individual users and does not support managing multiple organizations or business-level features.
    • B. Correct. An Enterprise account is designed for businesses, offering centralized billing, advanced security, and the ability to manage multiple organizations under one account.
    • C. Incorrect. An Organization account is for teams or groups but is focused on a single organization, not for centrally managing multiple organizations at scale.
    • D. Incorrect. An Education account is tailored for students and educators, not for business administration or managing organizations.

    Subdomain 1.2: Working with GitHub

    8.Which lightweight, branch-based workflow is recommended by GitHub for continuous delivery?

    1. A.A branching model with develop and main branches.
    2. B.A lightweight workflow with feature branches and pull requests.
    3. C.A method where every commit goes to a shared branch.
    4. D.A model with separate release branches and tags.
    Show answer & explanation

    Correct answer: BA lightweight workflow with feature branches and pull requests.

    • A. Incorrect. This describes GitFlow, which is a heavier, more structured branching model. GitHub recommends a simpler workflow focused on feature branches and pull requests for continuous delivery.
    • B. Correct. GitHub advocates a lightweight workflow using feature branches and pull requests. This approach supports isolated development, code review, and frequent integration, aligning well with continuous delivery.
    • C. Incorrect. Direct commits to a shared branch (e.g., main) reduce isolation and review opportunities, leading to instability and integration challenges. GitHub's recommended workflow avoids this.
    • D. Incorrect. Separate release branches and tags are part of more structured release management (like GitFlow) and are not the lightweight, branch-based workflow GitHub recommends for continuous delivery.

    Subdomain 1.2: Working with GitHub

    9.A large company needs to host GitHub on their own servers for security compliance. Which GitHub product should they choose?

    1. A.GitHub Free
    2. B.GitHub Team
    3. C.GitHub Enterprise Cloud
    4. D.GitHub Enterprise Server
    Show answer & explanation

    Correct answer: DGitHub Enterprise Server

    • A. Incorrect. GitHub Free is a cloud-based offering for individual users or small teams and does not support self-hosting on private servers.
    • B. Incorrect. GitHub Team is a cloud-based plan for teams and organizations but does not allow self-hosting on private infrastructure.
    • C. Incorrect. GitHub Enterprise Cloud is a cloud-based enterprise solution hosted by GitHub, not on the company's own servers.
    • D. Correct. GitHub Enterprise Server is the self-hosted version of GitHub, designed for organizations that need to run GitHub on their own infrastructure for security, compliance, or control reasons.

    Subdomain 1.2: Working with GitHub

    10.In GitHub Flow, what is the purpose of the 'Review required' feature?

    1. A.To require approval from designated reviewers before merging.
    2. B.To automatically merge after a review is submitted.
    3. C.To notify all organization members of the pull request.
    4. D.To block merging until all comments are resolved.
    Show answer & explanation

    Correct answer: ATo require approval from designated reviewers before merging.

    • A. Correct. The 'Review required' feature enforces that designated reviewers must approve a pull request before it can be merged, ensuring code quality and collaboration.
    • B. Incorrect. A review does not automatically merge a pull request; merging requires a separate action, even after required reviews are satisfied.
    • C. Incorrect. The feature is not for notifying all organization members; notifications are managed separately by GitHub's notification system.
    • D. Incorrect. Resolving comments is not the same as requiring a review; the core purpose of 'Review required' is approval from reviewers, not just comment resolution.

    Subdomain 1.2: Working with GitHub

    11.How do you create a horizontal rule in GitHub Markdown?(Select 2)

    1. A.--- or ***
    2. B.===
    3. C.###
    4. D.___
    Show answer & explanation

    Correct answers: A, D--- or ***; ___

    • A. Correct. In GitHub Markdown, a horizontal rule can be created using three or more hyphens (---) or asterisks (***). These are standard Markdown syntaxes supported by GitHub.
    • B. Incorrect. === is not the standard syntax for a horizontal rule in GitHub Markdown. In Markdown, equal signs are typically used for heading-style formatting in some variants, not horizontal rules.
    • C. Incorrect. ### creates a level-3 heading in Markdown, not a horizontal rule. It is used to format section titles.
    • D. Correct. In GitHub Markdown, a horizontal rule can also be created using three or more underscores (___). GitHub supports underscores alongside hyphens and asterisks for horizontal rules.

    Subdomain 1.2: Working with GitHub

    12.A contributor wants to comment on a specific line of code in a pull request. How can they do this?

    1. A.Click the '+' icon next to the line number in the 'Files changed' tab.
    2. B.Add a comment in the conversation tab mentioning the specific line.
    3. C.Send a direct message to the author referencing the specific line.
    4. D.Create a new issue and reference the file and line number.
    Show answer & explanation

    Correct answer: AClick the '+' icon next to the line number in the 'Files changed' tab.

    • A. Correct. In the 'Files changed' tab of a pull request, clicking the '+' icon next to a line number opens an inline comment box for line-specific feedback, allowing the contributor to comment directly on that line.
    • B. Incorrect. The conversation tab is for general discussion about the pull request, not for attaching comments to specific lines. Line-specific feedback must be added from the diff view in the Files changed tab.
    • C. Incorrect. GitHub does not use direct messages as a standard way to review code changes or comment on lines in a pull request. Review comments should be posted publicly in the pull request to be visible to all.
    • D. Incorrect. Creating a new issue is for tracking bugs, tasks, or feature requests, not for commenting on a specific line in an open pull request. Inline review comments keep the discussion tied directly to the changed code.

    Domain 2: Work with GitHub repositories

    Subdomain 2.1: Repository management

    13.Which file in a GitHub repository is typically used to provide a project overview, including installation instructions and usage examples?

    1. A.LICENSE
    2. B.README
    3. C.CONTRIBUTING
    4. D.CODEOWNERS
    Show answer & explanation

    Correct answer: BREADME

    • A. Incorrect. The LICENSE file defines the legal terms under which the project can be used, modified, and distributed. It does not provide a project overview, installation instructions, or usage examples.
    • B. Correct. The README file is the standard location for project documentation, including an overview, installation instructions, and usage examples. It is often the first file users see when visiting a repository.
    • C. Incorrect. The CONTRIBUTING file outlines how others can contribute to the project, such as coding standards or pull request guidelines. It is not intended for project overview or usage documentation.
    • D. Incorrect. The CODEOWNERS file specifies individuals or teams responsible for code in specific parts of the repository, used for code review assignments. It does not document installation or usage.

    Subdomain 2.1: Repository management

    14.The SECURITY.md file in a repository is primarily used to:

    1. A.Describe the project's security features in detail
    2. B.Provide instructions for vulnerability reporting
    3. C.Specify which team members have repository access
    4. D.List all dependencies and their security status
    Show answer & explanation

    Correct answer: BProvide instructions for vulnerability reporting

    • A. Incorrect. While SECURITY.md may briefly mention security features or practices, its primary purpose is not to describe all features in detail. The file is specifically intended to guide users on how to report security vulnerabilities responsibly.
    • B. Correct. SECURITY.md is designed to provide clear instructions for reporting security vulnerabilities, including contact methods, expected response times, and disclosure processes. GitHub uses this file to surface standardized security reporting guidance to contributors and users.
    • C. Incorrect. Repository access permissions are managed through GitHub's repository settings, roles, and team configurations. SECURITY.md is public-facing documentation and is not used as an access control mechanism.
    • D. Incorrect. Dependency inventories and their security status are typically handled by dependency management tools, security advisories, or Dependabot. SECURITY.md is focused on vulnerability reporting instructions rather than listing dependencies.

    Subdomain 2.1: Repository management

    15.What does the dependency graph in repository insights help you do?

    1. A.Track and display the total number of stars received
    2. B.Show project dependencies with version details
    3. C.Define protection rules for specific branches
    4. D.Show contribution statistics per developer
    Show answer & explanation

    Correct answer: BShow project dependencies with version details

    • A. Incorrect. The dependency graph does not track stars; stars are a popularity metric shown separately from dependency data.
    • B. Correct. The dependency graph shows a project's dependencies, including packages and libraries with version details, helping manage software dependencies.
    • C. Incorrect. Branch protection rules are configured in repository settings, not via the dependency graph; they control branch updates and merges.
    • D. Incorrect. Contribution statistics are shown in contributor graphs or insights, not the dependency graph, which focuses on software dependencies.

    Subdomain 2.1: Repository management

    16.When creating a new branch in GitHub, from which point is the branch created by default?

    1. A.From the repository's default branch
    2. B.From the commit of the last push
    3. C.Exclusively from the main branch
    4. D.From a commit selected at random
    Show answer & explanation

    Correct answer: AFrom the repository's default branch

    • A. Correct. By default, a new branch in GitHub is created from the repository's default branch (e.g., main or master), unless explicitly specified otherwise. This is the standard behavior when creating branches through the UI or CLI.
    • B. Incorrect. The branch is not created from the commit of the last push by default. The default base is the repository's default branch, not the most recent push commit, unless that commit is part of the default branch.
    • C. Incorrect. While the default branch is often named 'main', GitHub allows repositories to set any branch as the default. New branches are not exclusively created from 'main' but from whatever branch is set as the default.
    • D. Incorrect. GitHub does not create branches from random commits. Branch creation always uses a specified base branch or commit, with the default using the repository's default branch.

    Subdomain 2.1: Repository management

    17.Your repository has grown, and you need to prevent direct pushes to the main branch. What should you configure?

    1. A.Repository visibility
    2. B.Branch protection rules
    3. C.Issue templates
    4. D.CODEOWNERS file
    Show answer & explanation

    Correct answer: BBranch protection rules

    • A. Incorrect. Repository visibility controls who can see the repository (public, private, or internal) but does not restrict push permissions to specific branches. It is unrelated to branch-level write protection.
    • B. Correct. Branch protection rules allow you to enforce policies such as requiring pull request reviews, status checks, or preventing direct pushes to specific branches like main. This is the standard GitHub feature for controlling changes to important branches.
    • C. Incorrect. Issue templates help standardize the creation of issues, such as bug reports or feature requests. They do not affect repository write access or branch protection.
    • D. Incorrect. A CODEOWNERS file specifies who should review changes to certain files or paths, but it does not by itself prevent direct pushes to a branch. It can be used alongside branch protection, but it is not the setting that enforces the restriction.

    Subdomain 2.1: Repository management

    18.As a project lead, you want to check if your repository has all the recommended community files. Which dashboard provides this overview?

    1. A.Traffic page shows visitor statistics
    2. B.Community Profile in the Insights tab
    3. C.Dependency graph displays dependencies
    4. D.Contributors graph lists contributors
    Show answer & explanation

    Correct answer: BCommunity Profile in the Insights tab

    • A. Incorrect. The Traffic page shows visitor statistics such as views and clones, not the status of community files.
    • B. Correct. The Community Profile in the Insights tab provides an overview of recommended community files, including README, CONTRIBUTING, CODE_OF_CONDUCT, and license files. It is specifically designed to help maintainers see whether a repository includes these community health files.
    • C. Incorrect. The Dependency graph displays package and dependency relationships for the repository, which is useful for security and dependency management. It does not provide an overview of community files.
    • D. Incorrect. The Contributors graph lists contributor activity and participation over time. It is unrelated to checking for the presence of community files in the repository.

    Domain 3: Collaborate using GitHub

    Subdomain 3.1: Collaboration tools

    19.A repository administrator wants to enable GitHub Discussions. Which two steps are required? (Select TWO.)(Select 2)

    1. A.Go to the Settings tab of the repository
    2. B.Add a discussions folder to the repository root
    3. C.Under Features, enable the Discussions option
    4. D.Create a _discussions.yml configuration file
    5. E.Install a GitHub App for Discussions
    Show answer & explanation

    Correct answers: A, CGo to the Settings tab of the repository; Under Features, enable the Discussions option

    • A. Correct. Navigating to the repository's Settings tab is the first step to access repository-level configurations. From there, the administrator can enable GitHub Discussions in the Features section.
    • B. Incorrect. Adding a discussions folder to the repo root is not required to enable GitHub Discussions. Discussions are enabled through repository settings, not by adding a folder.
    • C. Correct. Under the Features section in Settings, enabling the Discussions option turns on the feature for that repository. This is a required step.
    • D. Incorrect. Creating a _discussions.yml configuration file is not necessary to enable GitHub Discussions. This file is used for customizing Discussion categories, not for enabling the feature.
    • E. Incorrect. Installing a GitHub App for Discussions is not required. GitHub Discussions is a built-in feature and is activated through repository settings.

    Subdomain 3.1: Collaboration tools

    20.Which of the following are valid notification delivery methods in GitHub? (Select TWO.)(Select 2)

    1. A.Email
    2. B.Web notifications on GitHub.com
    3. C.SMS text messages
    4. D.Direct Slack integration
    5. E.Desktop pop-up notifications
    Show answer & explanation

    Correct answers: A, BEmail; Web notifications on GitHub.com

    • A. Correct. GitHub delivers notifications via email as a standard method. Users can configure which events trigger email alerts in their notification settings, making it a primary delivery channel.
    • B. Correct. Web notifications appear on GitHub.com through the bell icon and notifications inbox, providing real-time updates about repository and account activity. This is a built-in delivery method.
    • C. Incorrect. GitHub does not natively support SMS text messages as a notification delivery method. Notifications are typically sent via email, web, or supported integrations.
    • D. Incorrect. GitHub does not have a native direct Slack integration as a built-in notification delivery method. Slack can be integrated through third-party tools or GitHub Actions, but it is not a core notification channel.
    • E. Incorrect. Desktop pop-up notifications are not a standard GitHub notification delivery method. While browsers or OS may show alerts, GitHub itself does not list desktop pop-ups as a primary channel.

    Subdomain 3.1: Collaboration tools

    21.If you are watching a repository with the default settings, which action generates a notification?

    1. A.A new issue is opened in the repository
    2. B.A file is pushed to an unmerged feature branch
    3. C.A Wiki page is edited in the repository
    4. D.A pull request is marked as draft status
    Show answer & explanation

    Correct answer: AA new issue is opened in the repository

    • A. Correct. With default watching settings, you receive notifications for new issues and pull requests. Opening a new issue is a standard event that triggers a notification.
    • B. Incorrect. Pushing to an unmerged feature branch does not generate a notification by default; watchers are notified about issues, pull requests, and releases, not individual pushes unless custom notifications are configured.
    • C. Incorrect. Wiki page edits are not part of the default notification set; they require custom notification configuration to trigger alerts for watchers.
    • D. Incorrect. Marking a pull request as draft does not generate a notification by default. Default watching notifies about opening, merging, or closing a pull request, but not status changes like draft.

    Subdomain 3.1: Collaboration tools

    22.Which of the following is a feature of GitHub Issues?

    1. A.Assignees
    2. B.CI/CD pipelines
    3. C.User authentication
    4. D.File storage
    Show answer & explanation

    Correct answer: AAssignees

    • A. Assignees are a built-in feature of GitHub Issues, allowing you to assign issues to one or more collaborators. This helps teams track ownership and responsibility for work.
    • B. Incorrect. CI/CD pipelines are typically handled by GitHub Actions or other external tools, not by GitHub Issues. Issues are for tracking tasks, bugs, and discussions.
    • C. Incorrect. User authentication is a platform-wide GitHub function, not a feature specific to GitHub Issues. Issues do not manage login or identity verification.
    • D. Incorrect. File storage is not a feature of GitHub Issues. GitHub Issues is used for project planning and tracking, while files are stored in repositories.

    Subdomain 3.1: Collaboration tools

    23.What happens when you include 'Closes #456' in a pull request description?

    1. A.It links the PR to issue #456 and closes it when merged.
    2. B.It sends a notification to the reporter of issue #456.
    3. C.It assigns issue #456 directly to the PR author.
    4. D.It creates a new issue with the number 456.
    Show answer & explanation

    Correct answer: AIt links the PR to issue #456 and closes it when merged.

    • A. Correct. Including 'Closes #456' in a pull request description links the pull request to issue #456, and GitHub will automatically close the issue when the pull request is merged, provided the repository has the feature enabled. This is a common way to connect work in a PR to a tracked issue.
    • B. Incorrect. The keyword 'Closes #456' does not send a notification to the issue reporter. It is a reference keyword used for linking and closing the issue upon merge, not for pinging users.
    • C. Incorrect. The phrase does not assign the issue to the PR author. Issue assignment is done separately through the issue or repository settings.
    • D. Incorrect. The text does not create a new issue. It references an existing issue (#456) and can trigger automatic closing on merge if the issue exists.

    Subdomain 3.1: Collaboration tools

    24.Which notification setting ensures you are only alerted when you are mentioned or when you participate in a thread?

    1. A.Watching - Custom: Participating and @mentions
    2. B.Not watching - no notifications for any activity
    3. C.Watching - All activity including mentions and participation
    4. D.Ignoring - no notifications regardless of involvement
    Show answer & explanation

    Correct answer: AWatching - Custom: Participating and @mentions

    • A. Correct. The 'Watching - Custom: Participating and @mentions' setting notifies you only when you are @mentioned or when you participate in a thread, such as by commenting. This matches the behavior described in the question.
    • B. Incorrect. The 'Not watching' setting means you receive no notifications from the repository at all, even if you are @mentioned or participate in a thread.
    • C. Incorrect. 'Watching - All Activity' sends notifications for every update in the repository, including commits, issues, and pull requests, which is far broader than just mentions or participation.
    • D. Incorrect. The 'Ignoring' setting suppresses all notifications from the repository, including those for mentions or participation, so you would not be alerted.

    Domain 4: Apply modern development practices

    Subdomain 4.1: Automation and AI tools

    25.Which GitHub Actions event allows you to manually trigger a workflow from the GitHub UI or API?

    1. A.push
    2. B.schedule
    3. C.workflow_dispatch
    4. D.pull_request
    Show answer & explanation

    Correct answer: Cworkflow_dispatch

    • A. Incorrect. 'push' is a valid GitHub Actions event, but it is not a manual trigger. It runs automatically when commits are pushed to a branch or tag.
    • B. Incorrect. 'schedule' is a valid workflow event for running on a cron schedule, but it is not a manual trigger. It is used for time-based automation rather than user-initiated execution.
    • C. Correct. 'workflow_dispatch' is the GitHub Actions event used to manually trigger a workflow from the GitHub UI or API. It is the standard option for on-demand execution.
    • D. Incorrect. 'pull_request' is a valid event that runs workflows in response to pull request activity, but it is not a manual trigger. It is used for automation tied to PR events such as opening, syncing, or reopening.

    Subdomain 4.1: Automation and AI tools

    26.Which of the following best describes a key capability of GitHub Copilot?

    1. A.Opening a documentation page in a web browser
    2. B.Generating a complete function from name and comments
    3. C.Suggesting variable names based on code context
    4. D.Highlighting syntax errors with linting tools
    Show answer & explanation

    Correct answer: BGenerating a complete function from name and comments

    • A. Incorrect. While GitHub Copilot can show documentation tooltips, it does not open documentation web pages. Its primary function is code completion and generation within the editor.
    • B. Correct. GitHub Copilot uses context from function names, comments, and surrounding code to generate complete functions or code blocks, accelerating development.
    • C. Incorrect. Suggesting variable names is a minor aspect; Copilot mainly generates code logic and structure, not just naming.
    • D. Incorrect. Highlighting syntax errors is typically handled by the editor or a linter, not by Copilot, which focuses on code completion and generation.

    Subdomain 4.1: Automation and AI tools

    27.Which GitHub Copilot plan is designed for organizations with business-ready controls and management features?

    1. A.Copilot for Individuals
    2. B.Copilot for Business
    3. C.Copilot Enterprise
    4. D.Copilot Free
    Show answer & explanation

    Correct answer: BCopilot for Business

    • A. Copilot for Individuals is designed for single users and personal use, not for centralized organizational management or business-ready controls.
    • B. Copilot for Business is the plan intended for organizations, offering centralized billing, policy management, and team adoption controls, matching the description of business-ready controls and management features.
    • C. Copilot Enterprise is meant for larger organizations with advanced enterprise capabilities, but the question specifically asks for business-ready controls and management features, which most directly matches Copilot for Business.
    • D. Copilot Free is a no-cost personal tier with limited capabilities and does not include organizational management features or business-ready controls.

    Subdomain 4.1: Automation and AI tools

    28.Which of the following are features of GitHub Copilot?(Select 3)

    1. A.Code completions in the IDE
    2. B.Chat feature on GitHub.com
    3. C.Org-specific knowledge bases
    4. D.Fine-tuned code models
    5. E.IP indemnity protection
    Show answer & explanation

    Correct answers: A, B, CCode completions in the IDE; Chat feature on GitHub.com; Org-specific knowledge bases

    • A. Correct. GitHub Copilot provides code completions directly in the IDE, suggesting lines or blocks of code as you type. This is a core feature.
    • B. Correct. GitHub Copilot includes a chat feature on GitHub.com, allowing users to ask questions and get assistance with coding tasks. It is a core AI-powered experience.
    • C. Correct. GitHub Copilot can leverage organization-specific knowledge bases to provide context-aware suggestions, improving relevance. This is available in GitHub Copilot Enterprise.
    • D. Incorrect. While GitHub Copilot uses fine-tuned models behind the scenes, 'Fine-tuned code models' is not a user-facing feature. The exam focuses on specific features like code completions and chat.
    • E. Incorrect. IP indemnity is a legal/commercial protection offered by GitHub for Copilot, not an automation or AI tool feature. It does not describe a functional capability.

    Subdomain 4.1: Automation and AI tools

    29.Which of the following is the primary unit of work in a GitHub Actions workflow file?

    1. A.Workflow name
    2. B.Event trigger (on)
    3. C.Jobs
    4. D.Steps
    5. E.Runner
    6. F.Action
    Show answer & explanation

    Correct answer: CJobs

    • A. Incorrect. The workflow name is an optional label for the workflow, not a core structural component that defines execution.
    • B. Incorrect. The event trigger specifies when the workflow runs, but it is a configuration element, not the main organizational unit.
    • C. Correct. Jobs are the top-level units in a GitHub Actions workflow, containing steps and defining execution order.
    • D. Incorrect. Steps are individual tasks within a job, not the primary unit of the workflow structure.
    • E. Incorrect. The runner is not a component defined in the workflow file; it is specified via the runs-on key within a job.
    • F. Incorrect. Actions are reusable units used within steps, but they are not the primary structural component.

    Subdomain 4.1: Automation and AI tools

    30.How can you ensure a long-running task in a GitHub Codespace continues even after the browser is closed?

    1. A.Use a nohup command in the terminal.
    2. B.Codespaces stop when the browser is closed.
    3. C.Enable 'Keep codespace alive' in settings.
    4. D.Use a GitHub Action to run the task.
    Show answer & explanation

    Correct answer: CEnable 'Keep codespace alive' in settings.

    • A. Incorrect. The `nohup` command prevents a process from being terminated when the terminal session ends, but it does not keep the Codespace itself alive. Codespaces lifecycle is managed by GitHub settings, not terminal commands.
    • B. Incorrect. While the default behavior may stop a Codespace after closing the browser, this is not strictly true because users can configure the idle timeout setting to keep the Codespace alive. The absolute statement is false.
    • C. Correct. GitHub Codespaces provides a built-in idle timeout setting (often referred to as 'Keep codespace alive' in user settings) that, when adjusted, allows the Codespace to remain active even after the browser is closed, ensuring long-running tasks continue.
    • D. Incorrect. GitHub Actions are used to automate workflows on separate runners; they do not control the runtime state of a developer's Codespace. The question is about keeping the Codespace alive, not offloading the task to an external runner.

    Domain 7: Explore the GitHub community

    Subdomain 7.1: Open-source engagement

    31.In what ways does GitHub support the open source community? (Choose three.)(Select 3)

    1. A.Providing unlimited free private repositories for individuals
    2. B.Offering free GitHub Team for open source organizations
    3. C.Hosting the GitHub Archive Program to preserve public code
    4. D.Granting scholarships to students for open source contributions
    5. E.Including open source maintainers in the GitHub Stars program
    6. F.Running the GitHub Campus Experts program for educators
    Show answer & explanation

    Correct answers: B, C, EOffering free GitHub Team for open source organizations; Hosting the GitHub Archive Program to preserve public code; Including open source maintainers in the GitHub Stars program

    • A. Incorrect. GitHub does not provide unlimited free private repositories for individuals; free private repositories have storage and collaborator limits. Additionally, private repositories do not directly support open source public collaboration.
    • B. Correct. GitHub offers free GitHub Team plans for open source organizations, allowing them to manage projects and collaborate without cost barriers. This directly supports the open source community by providing enterprise-grade tools for free.
    • C. Correct. The GitHub Archive Program preserves public open source code in the Arctic Code Vault and other long-term archives, ensuring that important open source projects remain accessible to future generations.
    • D. Incorrect. GitHub does not directly grant scholarships to students for open source contributions. Scholarships are typically offered by other organizations or programs.
    • E. Correct. The GitHub Stars program recognizes and celebrates open source maintainers and contributors who have a significant impact, providing visibility, support, and a platform to amplify their work.
    • F. Incorrect. The GitHub Campus Experts program is designed for student community leaders, not educators. It trains students to build technical communities on campus, but it does not specifically support open source as a primary focus.

    Subdomain 7.1: Open-source engagement

    32.Who can receive financial support through GitHub Sponsors?

    1. A.Any GitHub user that has a public repository
    2. B.Developers and organizations in supported regions
    3. C.Only current members of the GitHub Stars program
    4. D.Only organizations that have a verified domain
    Show answer & explanation

    Correct answer: BDevelopers and organizations in supported regions

    • A. Incorrect. Having a public repository does not automatically make a GitHub user eligible to receive sponsorships. Eligibility depends on the user's location and meeting program criteria, not solely on having a public repository.
    • B. Correct. GitHub Sponsors supports developers and organizations that are in supported regions and meet the program’s eligibility requirements. Sponsorship eligibility is not universal for all users; it depends on location and compliance with GitHub's policies.
    • C. Incorrect. GitHub Stars is a separate recognition program and is not the only path to receiving sponsorships. Many eligible developers and organizations outside that program can receive support through GitHub Sponsors.
    • D. Incorrect. A verified domain is not a requirement for receiving GitHub Sponsors support. While verification may be relevant for some organization settings, sponsorship eligibility is based on the program's criteria and the supported regions.

    Subdomain 7.1: Open-source engagement

    33.An open source maintainer wants to offer different levels of support to sponsors, such as priority bug fixes and private consulting. Which GitHub Sponsors feature should they configure?

    1. A.One-time sponsorship
    2. B.Sponsorship tiers
    3. C.Monthly sponsorship
    4. D.Sponsorship matching
    Show answer & explanation

    Correct answer: BSponsorship tiers

    • A. Incorrect. One-time sponsorship allows sponsors to make a single payment but does not support tiered benefits or different levels of support. Priority bug fixes and private consulting require a structured benefit system, which tiers provide.
    • B. Correct. Sponsorship tiers are designed for offering multiple levels of support with different benefits. A maintainer can define perks such as priority bug fixes, private consulting, or exclusive access at specific tier levels, based on the sponsor's contribution amount.
    • C. Incorrect. Monthly sponsorship refers to recurring payments but does not by itself create different support levels or sponsor rewards. While sponsors can subscribe monthly, the benefit structure requires tiers to differentiate perks.
    • D. Incorrect. Sponsorship matching is a separate feature where GitHub or other organizations match sponsor contributions, not for defining sponsor benefit levels. It does not allow maintainers to create structured packages with different perks.

    Subdomain 7.1: Open-source engagement

    34.What is a key characteristic of open source software?

    1. A.It is always distributed free of charge
    2. B.Its source code is publicly viewable and modifiable
    3. C.It cannot be used for commercial projects
    4. D.It must be developed solely by unpaid volunteers
    Show answer & explanation

    Correct answer: BIts source code is publicly viewable and modifiable

    • A. Incorrect. Open source software is not necessarily distributed free of charge; it can be sold or included in paid services. The defining feature is the license and availability of the source code, not the price.
    • B. Correct. A key characteristic of open source software is that its source code is publicly viewable, modifiable, and redistributable under the terms of its license, distinguishing it from proprietary software.
    • C. Incorrect. Open source software can be used for commercial projects; many businesses build products and services on top of open source components.
    • D. Incorrect. Open source projects can be developed by paid professionals, unpaid volunteers, or a mix of both. The development model does not determine open-source status.

    Subdomain 7.1: Open-source engagement

    35.An open source project needs free private repositories for its core team to plan features confidentially. The project has an open source license and is publicly available. Which GitHub offering should they apply for?

    1. A.GitHub Free for personal accounts
    2. B.GitHub Team for Open Source program
    3. C.GitHub Enterprise Cloud with private repos
    4. D.GitHub Pro for individual developers
    Show answer & explanation

    Correct answer: BGitHub Team for Open Source program

    • A. Incorrect. GitHub Free for personal accounts provides free private repositories only for individual users, not for teams. It does not address the needs of an open source project team requiring collaborative private repositories.
    • B. Correct. The GitHub Team for Open Source program is specifically designed for qualifying open source projects. It offers free access to GitHub Team features, including private repositories for core team members to plan features confidentially, provided the project has an open source license and is publicly available.
    • C. Incorrect. GitHub Enterprise Cloud is a paid enterprise product and is not free for open source projects. It would be unnecessarily expensive and is not the intended free offering for open source teams.
    • D. Incorrect. GitHub Pro is a paid plan for individual developers, not for teams. It does not provide free private repositories for an open source project team.

    Want the full experience?

    These are just samples. Practice the full GitHub Foundations (GH-900) question bank in quiz mode — free, no signup, with domain practice and exam simulation.