Show answerHide answer
Correct answer: B Pull requests
Explanation
Explanation:This question tests the fundamental purpose of pull requests (PRs) on GitHub. A pull request is the primary collaboration feature that facilitates the review, discussion, and final integration of proposed changes from one branch into another. It is the mechanism that culminates in the "merge" action.
Correct Option:
B. Pull requests
Pull requests are specifically designed to propose and merge changes. They provide an interface to compare differences (the "diff"), host conversations, run checks, and, once approved, execute the merge of the feature branch into the target branch (e.g., main).
Incorrect Option(s):
A. Issues
Issues are for tracking tasks, enhancements, and bugs. They are for discussion and planning, not for merging code. While linked to PRs, you cannot perform a merge from within an issue.
C. Projects
Projects is a project management tool for organizing work (issues, PRs) on boards or tables. It helps track the status of items but does not have functionality to execute a code merge.
D. Discussions
Discussions are for community conversations, Q&A, and brainstorming outside the context of specific code changes. They are for open-ended talk, not for performing version control operations like merging.
Reference:
GitHub Docs, "About pull requests," which states: "Pull requests let you tell others about changes you've pushed to a branch in a repository on GitHub. Once a pull request is opened, you can discuss and review the potential changes with collaborators and add follow-up commits before your changes are merged into the base branch." This defines merging as the outcome of a PR.