
Answer-first summary for fast verification
Answer: • Store your code in a Git-based version control system. • Establish a process that includes code reviews by peers and unit testing to ensure integrity and functionality before integration of code. • Establish a process where the fully integrated code in the repository becomes the latest master version.
The correct approach involves using a Git-based version control system, which is designed for collaborative software development and version control. It allows multiple developers to work on the same codebase without overwriting each other's changes by using branches and merge requests. Establishing a process that includes code reviews by peers and unit testing ensures that the code is reviewed for quality and functionality before it is integrated into the main branch. This process is superior to simply merging changes at the end of each day without review, as it maintains code integrity and functionality. Storing code in Google Drive or using .zip archives does not provide the same level of version control, collaboration features, or automation as Git, making options C and D less suitable for professional software development environments. Therefore, the best practices are outlined in option B.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
As the lead for Terraform template development, you need to establish a process and select a tool to prevent code conflicts between three engineers (including yourself) working on the same infrastructure code, while ensuring all changes are properly versioned. What solution should you implement?
A
• Store your code in a Git-based version control system. • Establish a process that allows developers to merge their own changes at the end of each day. • Package and upload code to a versioned Cloud Storage basket as the latest master version.
B
• Store your code in a Git-based version control system. • Establish a process that includes code reviews by peers and unit testing to ensure integrity and functionality before integration of code. • Establish a process where the fully integrated code in the repository becomes the latest master version.
C
• Store your code as text files in Google Drive in a defined folder structure that organizes the files. • At the end of each day, confirm that all changes have been captured in the files within the folder structure. • Rename the folder structure with a predefined naming convention that increments the version.
D
• Store your code as text files in Google Drive in a defined folder structure that organizes the files. • At the end of each day, confirm that all changes have been captured in the files within the folder structure and create a new .zip archive with a predefined naming convention. • Upload the .zip archive to a versioned Cloud Storage bucket and accept it as the latest version.
No comments yet.