nerdexam
CompTIA

XK0-005 · Question #748

A Linux systems administrator is updating code. After completing the update, the administrator wants to publish the updated code without including the configuration files. Which of the following…

The correct answer is C. .gitignore. .gitignore is correct. It is a plain text file in the repository root (or subdirectories) that lists file patterns Git should ignore and never include in commits or pushes. By adding configuration file names or patterns to .gitignore, the administrator ensures those files are…

System Management

Question

A Linux systems administrator is updating code. After completing the update, the administrator wants to publish the updated code without including the configuration files. Which of the following should the administrator use to accomplish this task?

Options

  • Agit clone
  • B.git
  • C.gitignore
  • Dgit fetch

How the community answered

(68 responses)
  • A
    13% (9)
  • B
    3% (2)
  • C
    76% (52)
  • D
    7% (5)

Explanation

.gitignore is correct. It is a plain text file in the repository root (or subdirectories) that lists file patterns Git should ignore and never include in commits or pushes. By adding configuration file names or patterns to .gitignore, the administrator ensures those files are excluded when publishing updated code. 'git clone' (A) is used to copy a repository, not to filter files. '.git' (B) is the hidden directory that stores Git metadata for the repository itself, not a filtering mechanism. 'git fetch' (D) downloads remote changes and has no role in excluding files from publication.

Topics

#Git#Version Control#File Exclusion#Configuration Management

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice