CompTIA Linux+ (XK0-005) — Question 217

A systems administrator checked out the code from the repository, created a new branch, made changes to the code, and then updated the main branch. The systems administrator wants to ensure that the Terraform state files do not appear in the main branch. Which of following should the administrator use to meet this requirement?

Answer options

Correct answer: B

Explanation

The correct answer is B, as using a .gitignore file allows the administrator to specify files or directories that should not be tracked by Git, including Terraform state files. The other options, such as clone (A), get (C), and .ssh (D), do not serve the purpose of ignoring specific files in the repository.