An administrator needs to version control changes to iac dec - CompTIA Linux + XK0-005

Question

An administrator needs to version control changes to IaC declaration templates.
Which command will maintain version control?

Answers
  1. correct
Explanation

The Correct Answer is: D. git clone https://github.com/comptia/linux+-.git && git checkout -b <new-branch>
This command sequence is best practice for version-controlling Infrastructure as Code (IaC) templates. It first clones the repository locally, then creates and checks out a new branch where the administrator can safely make and track changes. This ensures version history, collaboration, and rollback capabilities are maintained.

Why the other options are incorrect:

  • A. git clone https://github.com/comptia/linux+-.git git push origin
    This is a malformed command. It incorrectly combines cloning a repository with pushing to the origin. git push must be used after changes are committed to a local branch—not directly after cloning.

  • B. git clone https://github.com/comptia/linux+-.git git fetch New-Branch
    This command is also syntactically incorrect. git fetch cannot be used this way directly in a single command line with clone, and it doesn’t switch to or create a branch—just retrieves data.

  • C. git clone https://github.com/comptia/linux+-.git git status
    git status checks the status of a working directory but does not perform any version control action. It provides no branching or change-tracking functionality and doesn’t help set up version control after cloning.

Related Courses

Discover a range of courses designed to provide you with the knowledge and skills needed to excel in your chosen field.

a prepsaret exam featured image
CompTIA Prep

220-1201 - CompTIA A+ Exam Core 1

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

220-1202 - CompTIA A+ Exam Core 2

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA SecurityX CAS-005

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Cloud Essentials+ CLO-002

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Network+ N10-009

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Security+ SY0-701

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Data + DA0-001

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Pentest+

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA CySA+ CSO-003

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA DataSys+ DS0-001

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Tech+ FC0-U71

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Cloud+ CV0-004

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Server+ SK0-005

Start Course Prep

Easy way to pass your test within a week with prepsaret

You don’t need one month to study and pass your test.
With Prepsaret, it takes you a few days to grasp all the concepts needed to pass your exams

View Courses Offered