XK0-005 practice question 6 of 10
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?
Full set: 487 questionsIn Git version control management, developers frequently generate local configuration files, build artifacts, or secret files that should not be committed or shared publicly in source code repositories. The .gitignore file is a special text file placed in the repository root directory (or subdirectories) that specifies patterns for files and directories that Git must deliberately ignore. When code updates are published via commits and pushes, Git excludes any files matching rules defined inside .gitignore. Configuring .gitignore ensures sensitive configuration files remain on the administrator's local machine while allowing updated source code to be published cleanly. This represents standard operational best practices for maintaining code privacy and security across software deployment lifecycles.
A. git clone creates a copy of an existing remote Git repository onto a local system and does not manage file exclusion when publishing updates.
B. git - is an incomplete CLI syntax command and is not a valid Git operation or file configuration utility.
D. git fetch downloads objects and refs from another repository to update local tracking branches, rather than controlling file exclusion during code publication.
Pro Git, 2nd Edition (Scott Chacon and Ben Straub), Chapter 2: Git Basics - Ignoring Files.
Git Official Documentation, gitignore Manual Page (git-scm.com/docs/gitignore).
Keep practicing
Take the free XK0-005 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other XK0-005 practice questions
- Question 1A Linux engineer needs to block an incoming connection from the IP address 2.2.2.2 to a s…
- Question 2A systems administrator identifies multiple processes in a zombie state. Which of the fol…
- Question 3An administrator made a change to a system's network configuration. Which of the followin…
- Question 4Which of the following can reduce the attack surface area in relation to Linux hardening?
- Question 5A Linux administrator needs to check extended permissions applied to the directory test. …
- Question 7An operations engineer is planning to start a container running a PostgreSQL database. Th…
