
Answer-first summary for fast verification
Answer: `git rebase master`
Option C is CORRECT because running the `git rebase master` command while on Branch B will reapply the commits of Branch B onto the latest commits from the master branch. This ensures that the changes in Branch B are built on top of the latest code from the master branch, making it easier to detect conflicts before creating a pull request. Using git rebase helps to maintain a cleaner commit history by avoiding unnecessary merge commits.
Author: Ritesh Yadav
Ultimate access to all questions.
Question 12/58
Two developers are working on separate application releases. The developers have created feature branches named Branch A and Branch B by using a GitHub repository's master branch as the source.
The developer for Branch A deployed code to the production system. The code for Branch B will merge into a master branch in the following week's scheduled application release.
Which command should the developer for Branch B run before the developer raises a pull request to the master branch?
A
git diff branchB master
git commit -m
B
git pull master
C
git rebase master
D
git fetch -b master
No comments yet.