nerdexam
CompTIA

XK0-005 · Question #1572

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…

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…

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

How the community answered

(37 responses)
  • B
    92% (34)
  • C
    5% (2)
  • D
    3% (1)

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 Practice