Cisco
300-535 · Question #104
A developer needs to create a new branch using the tag "v2.1". After creation, the new code must be applied in the newly created branch. Which set of commands must the developer use?
The correct answer is C. git branch my-branch v2.1. The command git branch my-branch v2.1 creates a new branch named my-branch based on the tag v2.1. git checkout my-branch switches to the new branch to begin applying new code.
Automation Tools
Question
A developer needs to create a new branch using the tag "v2.1". After creation, the new code must be applied in the newly created branch. Which set of commands must the developer use?
Options
- Agit checkout -b my-branch v2.1 -create
- Bgit branch -create my-branch v2.1
- Cgit branch my-branch v2.1
- Dgit branch my-branch
How the community answered
(43 responses)- A5% (2)
- B9% (4)
- C84% (36)
- D2% (1)
Explanation
The command git branch my-branch v2.1 creates a new branch named my-branch based on the tag v2.1. git checkout my-branch switches to the new branch to begin applying new code.
Topics
#Git#branch creation#version tags#version control
Community Discussion
No community discussion yet for this question.