XK0-005 · Question #631
Application code is stored in Gil. Due to security concerns, the DevOps engineer does not want to keep a sensitive configuration file, app.conf, in the repository. Which of the following should the…
The correct answer is D. Add app.conf to .gitignore. This will prevent the file app.conf from being tracked by Git and uploaded to the repository. The .gitignore file is a special file that contains patterns of files and directories that Git should ignore. Any file that matches a pattern in the .gitignore file will not be staged…
Question
Application code is stored in Gil. Due to security concerns, the DevOps engineer does not want to keep a sensitive configuration file, app.conf, in the repository. Which of the following should the engineer do to prevent the file from being uploaded to the repository?
Options
- ARun git exclude app.conf.
- BRun git stash app.conf.
- CAdd app.conf to .exclude.
- DAdd app.conf to .gitignore.
How the community answered
(23 responses)- A4% (1)
- B13% (3)
- C4% (1)
- D78% (18)
Explanation
This will prevent the file app.conf from being tracked by Git and uploaded to the repository. The .gitignore file is a special file that contains patterns of files and directories that Git should ignore. Any file that matches a pattern in the .gitignore file will not be staged, committed, or pushed to the remote repository. The .gitignore file should be placed in the root directory of the repository and committed along with the other files.
Topics
Community Discussion
No community discussion yet for this question.