nerdexam
Cisco

300-435 · Question #96

A developer must move all the files in the plugins directory to the local Git staging area. Which Git command must be used to perform this task?

The correct answer is D. git add plugins/*. To move all files within the plugins directory to the local Git staging area, the git add plugins/* command must be used.

Network Automation Foundation

Question

A developer must move all the files in the plugins directory to the local Git staging area. Which Git command must be used to perform this task?

Exhibit

300-435 question #96 exhibit

Options

  • Agit track plugins/
  • Bgit commit plugins/*
  • Cgit branch plugins/
  • Dgit add plugins/*

How the community answered

(46 responses)
  • A
    2% (1)
  • B
    2% (1)
  • C
    7% (3)
  • D
    89% (41)

Why each option

To move all files within the `plugins` directory to the local Git staging area, the `git add plugins/*` command must be used.

Agit track plugins/

There is no standard Git command 'git track'; tracking is generally an implied concept when adding files or setting up remote branches.

Bgit commit plugins/*

The 'git commit' command is used to record staged changes to the repository history, not to move files to the staging area.

Cgit branch plugins/

The 'git branch' command is used to create, list, or delete branches, not to stage files.

Dgit add plugins/*Correct

The 'git add' command is used to add changes from the working directory to the staging area. By specifying 'plugins/*', it tells Git to add all files and subdirectories directly within the 'plugins' directory to the staging index, preparing them for the next commit.

Concept tested: Git staging area commands

Source: https://git-scm.com/docs/git-add

Topics

#Git#Version Control#Staging Area#Git Commands

Community Discussion

No community discussion yet for this question.

Full 300-435 Practice