Google Cloud Professional Cloud Developer — Question 318
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 before each major release.
Correct answer: C
Explanation
The correct answer, C, promotes daily integration of code changes into the main branch, which aligns with best practices for continuous integration and delivery. This approach minimizes conflicts and improves collaboration among developers. Options A and B do not encourage frequent integration, and option D delays merging until major releases, which can lead to integration challenges.