Google Cloud Professional Cloud Developer — Question 252
You are a developer at a large organization. Your team uses Git for source code management (SCM). You want to ensure that your team follows Google-recommended best practices to manage code to drive higher rates of software delivery. Which SCM process should your team use?
Answer options
- A. Each developer commits their code to the main branch before each product release, conducts testing, and rolls back if integration issues are detected.
- B. Each group of developers copies the repository, commits their changes to their repository, and merges their code into the main repository before each product release.
- C. Each developer creates a branch for their own work, commits their changes to their branch, and merges their code into the main branch daily.
- D. Each group of developers creates a feature branch from the main branch for their work, commits their changes to their branch, and merges their code into the main branch after the change advisory board approves it.
Correct answer: D
Explanation
The correct answer is D because creating a feature branch allows developers to work on new features in isolation and ensures that changes are reviewed and approved before merging into the main branch. Options A and C lack the structured review process that enhances code quality, while option B does not utilize feature branches, which are essential for managing concurrent development efforts effectively.