You have been working on a new feature in a separate branch called 'feature-xyz' of your project's repository. After completing the work on your feature, you want to integrate it into the main codebase. What is the next step to request the integration of your changes into the 'main' branch, ensuring that your peers can review it before it is merged?
Create a pull request in the repository, comparing your 'feature-xyz' branch to the 'main' branch.
Commit the changes in your 'feature-xyz' branch and notify your team that the feature is complete.
Tag the latest commit in your 'feature-xyz' branch and ask your team to review the tag.
Push the changes from your 'feature-xyz' branch directly to the 'main' branch without a pull request.
The correct answer is to create a pull request. A pull request is initiated by the contributor to propose the changes made in their branch to be pulled into another branch, typically the main repository branch. It provides an opportunity for peer review and discussion before the changes are merged. Pushing changes directly without a pull request bypasses the review process, while committing changes only affects the local repository and does not notify team members of the proposed changes. Tagging the latest commit creates a reference to a specific point in the repository history, but it does not facilitate the merging and review process like a pull request does.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a pull request?
Open an interactive chat with Bash
Why is peer review important before merging changes?
Open an interactive chat with Bash
What happens if I push changes directly to the main branch?