nerdexam
Microsoft

GH-900 · Question #59

You've made changes in a branch called feature-update and now want to merge it into the main branch of the same repository. What is the correct base and compare setup when opening a pull request?

The correct answer is A. Base: main, Compare: feature-updateright. The base branch is where the changes will be merged into (usually main), and the compare branch is where the changes are coming from (feature-update). Option A is CORRECT because when creating a pull request, the base branch is the one you want to merge your changes into (in…

Collaboration Features

Question

You've made changes in a branch called feature-update and now want to merge it into the main branch of the same repository. What is the correct base and compare setup when opening a pull request?

Options

  • ABase: main, Compare: feature-updateright
  • BBase: feature-update, Compare: main
  • CBase: main, Compare: main
  • DBase: develop, Compare: main

How the community answered

(23 responses)
  • A
    78% (18)
  • B
    4% (1)
  • C
    4% (1)
  • D
    13% (3)

Explanation

The base branch is where the changes will be merged into (usually main), and the compare branch is where the changes are coming from (feature-update). Option A is CORRECT because when creating a pull request, the base branch is the one you want to merge your changes into (in this case, main), and the compare branch is the one that contains the new changes (in this case, feature-update). https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to- your-work-with-pull-requests/creating-a-pull-request https://docs.github.com/en/repositories/creating-and-managing-repositories/about-repositories

Topics

#Pull Request#Branch merging#Git branching#GitHub collaboration

Community Discussion

No community discussion yet for this question.

Full GH-900 Practice