AWS Certified Developer – Associate (DVA-C02) — Question 137
A company has an application that uses AWS CodePipeline to automate its continuous integration and continuous delivery (CI/CD) workflow. The application uses AWS CodeCommit for version control. A developer who was working on one of the tasks did not pull the most recent changes from the main branch. A week later, the developer noticed merge conflicts.
How can the developer resolve the merge conflicts in the developer's branch with the LEAST development effort?
Answer options
- A. Clone the repository. Create a new branch. Update the branch with the changes.
- B. Create a new branch. Apply the changes from the previous branch.
- C. Use the Commit Visualizer view to compare the commits when a feature was added. Fix the merge conflicts.
- D. Stop the pull from the main branch to the feature branch. Rebase the feature branch from the main branch.
Correct answer: D
Explanation
The correct answer is D because rebasing the feature branch onto the main branch integrates the latest changes, effectively resolving merge conflicts with minimal effort. Options A and B involve creating new branches, which is unnecessary and adds complexity, while option C requires manual conflict resolution and is not the most efficient method.