Developing Applications and Automating Workflows Using Cisco Platforms (DEVASC) — Question 422

Which two commands create a new branch in a Git repository? (Choose two.)

Answer options

Correct answer: A, E

Explanation

The command 'git branch' (A) is used to create a new branch in Git. The command 'git checkout -b' (E) not only creates a new branch but also switches to it immediately. Options B, C, and D are incorrect because 'git checkout' (B) alone does not create a new branch without the '-b' flag, and 'gitcheckout' (C) and 'gitbranch' (D) are not valid commands.