Practice Free GitHub Foundations Exam Online Questions
Question #21
Which of the following are included as pre-defined repository roles? (Each answer presents a complete solution. Choose three.)
- A . Security
- B . View
- C . Triage
- D . Maintain
- E . Delete
- F . Write
Correct Answer: C, D, F
C, D, F
Explanation:
GitHub provides several pre-defined repository roles that determine the level of access and permissions a user has within a repository.
The roles that are included by default are:
Triage: Allows users to manage issues and pull requests without write access to the code.
Maintain: Provides more extensive access, including managing settings, but without full administrative control.
Write: Grants permission to push changes and manage issues and pull requests.
Roles like "Security" and "Delete" are not standard pre-defined roles, and "View" is generally referred to as "Read" in GitHub’s permission structure.
C, D, F
Explanation:
GitHub provides several pre-defined repository roles that determine the level of access and permissions a user has within a repository.
The roles that are included by default are:
Triage: Allows users to manage issues and pull requests without write access to the code.
Maintain: Provides more extensive access, including managing settings, but without full administrative control.
Write: Grants permission to push changes and manage issues and pull requests.
Roles like "Security" and "Delete" are not standard pre-defined roles, and "View" is generally referred to as "Read" in GitHub’s permission structure.
Question #22
Which mechanisms can you use to personalize Codespaces for your account? (Each correct answer presents part of the solution. Choose two.)
- A . branch protections
- B . IDE plug-ins
- C . dotfiles
- D . operating system
- E . devcontainer
- F . settings sync
Correct Answer: CF
Question #23
Which of the following can be performed within GitHub Desktop?
- A . Creating and managing issues
- B . Reviewing and approving pull requests
- C . Adding and cloning repositories
- D . Commenting on discussions
- E . Integrating with office suite software
Correct Answer: C
C
Explanation:
GitHub Desktop is a graphical interface that allows users to interact with GitHub repositories. It simplifies certain Git operations without the need for command-line usage.
GitHub Desktop Capabilities:
Option C is correct because GitHub Desktop allows users to add local repositories to their GitHub account, clone repositories from GitHub to their local machine, and manage repositories effectively.
Incorrect Options:
Option A is incorrect because GitHub Desktop does not support creating or managing issues directly; this is done through the GitHub web interface.
Option B is incorrect because reviewing and approving pull requests is also managed through the GitHub web interface.
Option D is incorrect because commenting on discussions is done on the GitHub platform, not through GitHub Desktop.
Option E is incorrect because GitHub Desktop does not integrate with office suite software.
Reference: GitHub Docs: GitHub Desktop Documentation
C
Explanation:
GitHub Desktop is a graphical interface that allows users to interact with GitHub repositories. It simplifies certain Git operations without the need for command-line usage.
GitHub Desktop Capabilities:
Option C is correct because GitHub Desktop allows users to add local repositories to their GitHub account, clone repositories from GitHub to their local machine, and manage repositories effectively.
Incorrect Options:
Option A is incorrect because GitHub Desktop does not support creating or managing issues directly; this is done through the GitHub web interface.
Option B is incorrect because reviewing and approving pull requests is also managed through the GitHub web interface.
Option D is incorrect because commenting on discussions is done on the GitHub platform, not through GitHub Desktop.
Option E is incorrect because GitHub Desktop does not integrate with office suite software.
Reference: GitHub Docs: GitHub Desktop Documentation
Question #24
Which of the following best describes cloning a repository?
- A . It creates a copy of the repository on GitHub.com.
- B . It retrieves code updates from the remote repository.
- C . It creates a copy of the repository on your local machine.
- D . It imports your source code into a new repository.
Correct Answer: C
C
Explanation:
Cloning a repository in GitHub refers to creating a copy of the repository on your local machine. This allows you to work on the project offline, make changes, and later push those changes back to the remote repository. It does not involve creating a copy on GitHub.com (which would be forking), retrieving updates (which would be pulling), or importing source code into a new repository (which is done differently).
C
Explanation:
Cloning a repository in GitHub refers to creating a copy of the repository on your local machine. This allows you to work on the project offline, make changes, and later push those changes back to the remote repository. It does not involve creating a copy on GitHub.com (which would be forking), retrieving updates (which would be pulling), or importing source code into a new repository (which is done differently).
Question #25
Workflows can reference actions in: (Each correct answer presents a complete solution. Choose three.)
- A . Any public repository.
- B . The same repository as your workflow file.
- C . GitHub Packages.
- D . An enterprise marketplace.
- E . A published Docker container image on Docker Hub.
Correct Answer: A, B, E
A, B, E
Explanation:
In GitHub Actions workflows, actions can be referenced from various sources depending on the needs of the workflow.
Any Public Repository:
Option A is correct. Actions can be referenced from any public GitHub repository, allowing the reuse of shared actions across multiple projects.
The Same Repository as Your Workflow File:
Option B is correct. Actions stored in the same repository as the workflow file can be referenced directly, which is common for custom actions specific to that project.
A Published Docker Container Image on Docker Hub:
Option E is correct. Workflows can reference actions that are provided as Docker container images hosted on Docker Hub, allowing integration of complex tools and environments.
Incorrect Options:
Option C (GitHub Packages) is incorrect as it is more commonly used for storing and managing dependencies, not actions.
Option D (An enterprise marketplace) is incorrect because GitHub Actions are not directly referenced from an enterprise marketplace but rather from public repositories or Docker images.
Reference: GitHub Docs: Reusing Workflows
A, B, E
Explanation:
In GitHub Actions workflows, actions can be referenced from various sources depending on the needs of the workflow.
Any Public Repository:
Option A is correct. Actions can be referenced from any public GitHub repository, allowing the reuse of shared actions across multiple projects.
The Same Repository as Your Workflow File:
Option B is correct. Actions stored in the same repository as the workflow file can be referenced directly, which is common for custom actions specific to that project.
A Published Docker Container Image on Docker Hub:
Option E is correct. Workflows can reference actions that are provided as Docker container images hosted on Docker Hub, allowing integration of complex tools and environments.
Incorrect Options:
Option C (GitHub Packages) is incorrect as it is more commonly used for storing and managing dependencies, not actions.
Option D (An enterprise marketplace) is incorrect because GitHub Actions are not directly referenced from an enterprise marketplace but rather from public repositories or Docker images.
Reference: GitHub Docs: Reusing Workflows
Question #26
Which of the following two-factor authentication (2FA) methods can you use to secure a GitHub account? (Each answer presents a complete solution. Choose three.)
- A . Authenticator app
- B . Security questions
- C . GitHub mobile
- D . Security keys
- E . Single sign-on
Correct Answer: A, C, D
A, C, D
Explanation:
The following two-factor authentication (2FA) methods can be used to secure a GitHub account:
A, C, D
Explanation:
The following two-factor authentication (2FA) methods can be used to secure a GitHub account:
Question #27
After 30 minutes of inactivity, a GitHub Codespace will:
- A . Be deleted
- B . Commit changes
- C . Restart
- D . Time out
Correct Answer: D
D
Explanation:
After 30 minutes of inactivity, a GitHub Codespace will time out. This is designed to conserve resources when the Codespace is not being actively used. The session will be paused, and you’ll need to reconnect to resume your work. However, the Codespace is not deleted, and any unsaved changes might not be lost but should be committed or saved to prevent data loss.
D
Explanation:
After 30 minutes of inactivity, a GitHub Codespace will time out. This is designed to conserve resources when the Codespace is not being actively used. The session will be paused, and you’ll need to reconnect to resume your work. However, the Codespace is not deleted, and any unsaved changes might not be lost but should be committed or saved to prevent data loss.