0
0
Gitdevops~10 mins

What a branch is (pointer to a commit) in Git - Interactive Code Practice

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

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

Git
git branch [1]
Drag options to blanks, or click blank then click option'
Acommit
Bfeature
Cmaster
DHEAD
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'commit' or 'HEAD' instead of a branch name.
2fill in blank
medium

Complete the command to switch to the branch named 'develop'.

Git
git checkout [1]
Drag options to blanks, or click blank then click option'
Adevelop
Bcommit
CHEAD
Dmaster
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'HEAD' or 'commit' which are not branch names.
3fill in blank
hard

Fix the error in the command to delete a branch named 'old-feature'.

Git
git branch [1] old-feature
Drag options to blanks, or click blank then click option'
A-d
B-m
C-c
D-b
Attempts:
3 left
💡 Hint
Common Mistakes
Using -m which renames a branch instead.
4fill in blank
hard

Fill both blanks to create a new branch 'test' and switch to it immediately.

Git
git [1] -b [2]
Drag options to blanks, or click blank then click option'
Acheckout
Bbranch
Ctest
Dcommit
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'branch' instead of 'checkout' for this combined action.
5fill in blank
hard

Fill all three blanks to list all branches and show the current branch with a star.

Git
git [1] [2] [3]
Drag options to blanks, or click blank then click option'
Abranch
B-a
C-v
Dcheckout
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'checkout' which switches branches instead of listing them.