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.
Question
Exhibit
Options
- Agit track plugins/
- Bgit commit plugins/*
- Cgit branch plugins/
- Dgit add plugins/*
How the community answered
(46 responses)- A2% (1)
- B2% (1)
- C7% (3)
- D89% (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.
There is no standard Git command 'git track'; tracking is generally an implied concept when adding files or setting up remote branches.
The 'git commit' command is used to record staged changes to the repository history, not to move files to the staging area.
The 'git branch' command is used to create, list, or delete branches, not to stage files.
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
Community Discussion
No community discussion yet for this question.
