Which of the following are included as pre-defined repository roles?
(Each answer presents a complete solution. Choose three.)
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.
Which of the following is a primary goal of GitHub's community?
GitHub's community is centered around enabling developers to collaborate and innovate together. The platform provides tools and environments that foster open communication, sharing of ideas, and collective problem-solving.
Facilitating Collaboration and Creativity:
Option C is correct because GitHub is designed to be a collaborative platform where developers can work together on projects, share code, and contribute to open source initiatives, all in an environment that encourages creativity.
Incorrect Options:
Option A is incorrect because GitHub is inclusive of developers of all skill levels, not just experienced ones.
Option B is incorrect because GitHub is not about creating a competitive environment; rather, it focuses on collaboration.
Option D is incorrect because while code quality is important, enforcing strict code quality standards is not the primary goal of the GitHub community.
What is the minimum access needed to contribute to a repository?
To contribute to a GitHub repository, a user typically needs to be able to create branches, push changes, and open pull requests. These actions require Write access, which is the minimum level of access needed to contribute code directly to a repository.
Write Access:
Option D is correct because 'Write' access allows users to contribute to the repository by pushing changes, creating branches, and opening pull requests. This is the minimum required access level for contributing code.
Incorrect Options:
Option A (Read) is incorrect because 'Read' access only allows viewing the repository, not making changes.
Option B (Triage) is incorrect because while Triage access allows managing issues and pull requests, it does not allow pushing code.
Option C (Maintain) is incorrect because 'Maintain' access includes additional permissions beyond those needed for basic contributions, such as managing repository settings.
Which of the following describes a branch in Git?
In Git, a branch is a fundamental concept that represents an independent line of development within a project. Here's a more detailed explanation:
Branch in Git:
Option C is correct because a branch in Git is essentially a separate, isolated copy of the project's codebase where you can make changes without affecting the main codebase. Branches allow developers to work on features, fixes, or experiments in parallel to the main project.
Other Options:
Option A is incorrect because while a branch does point to a specific commit (which represents a snapshot of the project), the description lacks the emphasis on the isolated and parallel development aspect that is critical to the understanding of branches.
Option B is incorrect because a branch is not a physical copy stored on disk; it is a logical reference within the repository.
Option D is incorrect because that description better fits the concept of a fork, not a branch. A fork is a new repository that is a copy of another repository, usually used to contribute back to the original ('upstream') repository.
Which of the following is an Innersource development practice?
Innersource is a development practice where an organization adopts open-source development methodologies within its own internal environment. The primary goal of innersource is to break down silos and encourage collaboration across different teams within the organization.
Sharing Code Between Teams:
Option B is correct because innersource involves sharing code between teams within the organization, similar to how open-source communities share code across the public domain. This practice fosters collaboration, improves code quality, and allows for reuse of code, reducing duplication of efforts.
Incorrect Options:
Option A is incorrect because adopting open-source code into the organization is related to using open-source software, not specifically to innersource practices.
Option C is incorrect because removing open-source code from the organization is contrary to the principles of both open source and innersource.
Option D is incorrect because making all repositories publicly accessible refers to open source, not innersource. Innersource typically involves keeping code internal to the organization.
GitHub Docs: What is Innersource?
Innersource Commons: The Basics