CompTIA Linux+ (XK0-005) — Question 97
A DevOps engineer needs to download a Git repository from https://git.company.com/admin/project.git. Which of the following commands will achieve this goal?
Answer options
- A. git clone https://git.company.com/admin/project.git
- B. git checkout https://git.company.com/admin/project.git
- C. git pull https://git.company.com/admin/project.git
- D. git branch https://git.company.com/admin/project.git
Correct answer: A
Explanation
The correct command to download a repository is 'git clone', which creates a local copy of the repository. 'git checkout' is used to switch branches, 'git pull' is for updating the current branch with changes from the remote repository, and 'git branch' is for managing branches, none of which will download the repository.