nerdexam
CompTIACompTIA

XK0-005 · Question #1572

XK0-005 Question #1572: Real Exam Question with Answer & Explanation

The correct answer is B: .gitignore. To prevent certain files from being tracked by Git, the administrator can use a .gitignore file (B) in the repository. The .gitignore file can specify patterns of files or directories that Git should ignore. This way, the Terraform state files will not appear in the main branch o

Scripting, Containers, and Automation

Question

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?

Options

  • Aclone
  • B.gitignore
  • Cget
  • D.ssh

Explanation

To prevent certain files from being tracked by Git, the administrator can use a .gitignore file (B) in the repository. The .gitignore file can specify patterns of files or directories that Git should ignore. This way, the Terraform state files will not appear in the main branch or any other branch. The other commands are not related to this requirement.

Topics

#Git#Version Control#.gitignore#Repository Management

Community Discussion

No community discussion yet for this question.

Full XK0-005 PracticeBrowse All XK0-005 Questions