0
0
Gitdevops~10 mins

Creating and switching in one step in Git - Interactive Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the command to create and switch to a new branch named 'feature'.

Git
git [1] feature
Drag options to blanks, or click blank then click option'
Amerge
Bbranch
Cswitch
Dcheckout -b
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'git branch' only creates the branch but does not switch.
Using 'git switch' alone without '-c' does not create a branch.
Using 'git merge' is for combining branches, not creating.
2fill in blank
medium

Complete the command to create and switch to a new branch named 'hotfix' using the modern git command.

Git
git [1] -c hotfix
Drag options to blanks, or click blank then click option'
Abranch
Bcheckout
Cswitch
Dmerge
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'git checkout' is older but still valid.
Using 'git branch' does not switch branches.
Using 'git merge' is unrelated.
3fill in blank
hard

Fix the error in the command to create and switch to a new branch named 'release'.

Git
git switch [1] release
Drag options to blanks, or click blank then click option'
A-c
B-b
C--create
D-n
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-b' with 'git switch' causes an error.
Using '--create' is not a valid option.
Using '-n' does not create a branch.
4fill in blank
hard

Fill both blanks to create and switch to a new branch named 'dev' using the older git command.

Git
git [1] [2] dev
Drag options to blanks, or click blank then click option'
Acheckout
Bbranch
C-b
D-c
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'git branch -b' is invalid.
Using '-c' with 'checkout' is incorrect.
Using 'git switch' instead of 'checkout' here.
5fill in blank
hard

Fill all three blanks to create and switch to a new branch named 'test' using the modern git command.

Git
git [1] [2] [3]
Drag options to blanks, or click blank then click option'
Aswitch
B-c
Ctest
Dcheckout
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'checkout' instead of 'switch' for modern command.
Omitting '-c' option.
Placing branch name before the option.