ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 33 - XK0-005 discussion

Report
Export

An administrator needs to make some changes in the IaC declaration templates. Which of the following commands would maintain version control?

A.
git clone https://github.com/comptia/linux+-.gitgit push origin
Answers
A.
git clone https://github.com/comptia/linux+-.gitgit push origin
B.
git clone https://qithub.com/comptia/linux+-.gitgit fetch New-Branch
Answers
B.
git clone https://qithub.com/comptia/linux+-.gitgit fetch New-Branch
C.
git clone https://github.com/comptia/linux+-.gitgit status
Answers
C.
git clone https://github.com/comptia/linux+-.gitgit status
D.
git clone https://github.com/comptia/linuxt+-.gitgit checkout -b <new-branch>
Answers
D.
git clone https://github.com/comptia/linuxt+-.gitgit checkout -b <new-branch>
Suggested answer: D

Explanation:

The command that will maintain version control while making some changes in the IaC declaration templates is git checkout -b <new-branch>. This command uses the git tool, which is a distributed version control system that tracks changes in source code and enables collaboration among developers. The checkout option switches to a different branch in the git repository, where a branch is a pointer to a specific commit in the history. The -b option creates a new branch with the given name, and switches to it. This way, the administrator can make changes in the new branch without affecting the main branch, and later merge them if needed.

The other options are not correct commands for maintaining version control while making some changes in the IaC declaration templates. The git clone https://github.com/comptia/linux±.git command will clone an existing repository from a remote URL to a local directory, but it will not create a new branch for making changes. The git push origin command will push the local changes to a remote repository named origin, but it will not create a new branch for making changes. The git fetch New-Branch command will fetch updates from a remote branch named New-Branch, but it will not create a new branch for making changes. Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 19: Managing Source Code; Git - Basic Branching and Merging

asked 02/10/2024
Wissam Aoun
38 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first