Exam Data-Engineer-Associate Topic 1 Question 222 Discussion

Actual exam question for Amazon's Data-Engineer-Associate exam
Question #: 222
Topic #: 1
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?

Suggested Answer: C Vote an answer

To ensure that Branch B is up to date with the latest changes in the master branch before submitting a pull request, the correct approach is to perform a git rebase. This command rewrites the commit history so that Branch B will be based on the latest changes in the master branch.
git rebase master:
This command moves the commits of Branch B to be based on top of the latest state of the master branch. It allows the developer to resolve any conflicts and create a clean history.
Reference: Git Rebase Documentation
Alternatives Considered:
A (git diff): This will only show differences between Branch B and master but won't resolve conflicts or bring Branch B up to date.
B (git pull master): Pulling the master branch directly does not offer the same clean history management as rebase.
D (git fetch -b): This is an incorrect command.
References:
Git Rebase Best Practices

by Kerr at Feb 11, 2026, 10:56 AM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

0
0
0
10