0
0
Gitdevops~10 mins

Why branches are essential in Git - Test Your Understanding

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

Complete the code to create a new branch named 'feature'.

Git
git branch [1]
Drag options to blanks, or click blank then click option'
Amaster
Bfeature
Cmain
Ddevelop
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'main' or 'master' creates or switches to existing branches, not new feature branches.
2fill in blank
medium

Complete the command to switch to the 'feature' branch.

Git
git [1] feature
Drag options to blanks, or click blank then click option'
Acheckout
Bcommit
Cmerge
Dbranch
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'branch' only lists or creates branches, it does not switch.
3fill in blank
hard

Fix the error in the command to merge 'feature' into 'main'.

Git
git [1] feature
Drag options to blanks, or click blank then click option'
Acheckout
Bbranch
Ccommit
Dmerge
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'checkout' or 'branch' instead of 'merge' causes errors or wrong actions.
4fill in blank
hard

Fill both blanks to create and switch to a new branch named 'bugfix'.

Git
git [1] -b [2]
Drag options to blanks, or click blank then click option'
Acheckout
Bbranch
Cfeature
Dbugfix
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'branch' with '-b' is invalid; '-b' is used with 'checkout'.
5fill in blank
hard

Fill all three blanks to delete a local branch named 'oldfeature'.

Git
git [1] -[2] [3]
Drag options to blanks, or click blank then click option'
Abranch
Bd
Coldfeature
Dcheckout
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'checkout' instead of 'branch' will cause errors.