Free Microsoft GH-900 Actual Exam Questions - Question 4 Discussion
Maybe A, since commits exist on branches and PRs link to those branches.
It’s A for sure. Commits are tied to branches, and the pull request is basically a proposal to merge those branch commits. B and C don’t work because you can add commits both before and after opening a PR. D is off since commits aren’t made “on” a PR; the PR just references the branch’s commits. So A captures the relationship best without mixing up the order or scope of commits and PRs.
B tbh, commits can't only happen after a PR since you normally commit first to the branch. So B is definitely out. A fits better because PRs are just requests to merge commits already on a branch.
A vs C? I don’t think commits only happen before a PR is created because you can keep pushing commits to the branch after opening the PR, which will update the PR automatically. So C feels wrong. D is off because commits aren’t made on the PR itself, they’re always on branches. That leaves A as the most straightforward and general option.
Probably A, since commits belong to branches which PRs then propose to merge.
D imo, commits don't happen "on a pull request" itself; PRs are more like a request to merge a branch with commits. So commits belong to branches, not directly to PRs.
It’s A, commits happen on branches and PRs just link to those branches.
A imo, commits live on branches independently of pull requests. You can keep committing after opening a PR, and the PR just tracks those branch changes. B and C are off because commits aren’t tied strictly to before or after PR creation, and D mixes up how branches and PRs relate.
A commits happen on branches; pull requests just propose merging those branches.
It's gotta be A. Commits happen on a branch, and that branch can have a pull request linked to it. B and C are too strict, and D flips the relationship wrong.