Developing Applications and Automating Workflows Using Cisco Platforms (DEVASC) — Question 452
A developer is working on an existing feature that needs enhancing. The primary production branch for the application is ‘prim4a3b8c6d80374’ and the branch for working on the feature is ‘feat145678909’. The developer needs to create a clone of the single branch used for the feature that only has commits included in the current line of history. Which Git command must be used?
Answer options
- A. git clone [url] - -feat145678909 - -single-branch
- B. git clone [url] - -branch feat145678909 - -single
- C. git clone [url] - -single-branch feat145678909
- D. git clone [url] - -branch feat145678909 - -single-branch
Correct answer: D
Explanation
The correct command is D because it specifies the branch to clone with '- -branch feat145678909' and ensures only that branch is cloned using '- -single-branch'. Options A and C contain incorrect command syntax, while option B uses '- -single' instead of '- -single-branch', making it invalid.