0
0
Gitdevops~10 mins

Creating branches with git branch - Interactive 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'
Amerge
Bcheckout
Ccommit
Dfeature
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'checkout' instead of the branch name.
Trying to commit or merge instead of creating a branch.
2fill in blank
medium

Complete the command to list all branches in the repository.

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

Fix the error in the command to create a branch named 'dev'.

Git
git [1] dev
Drag options to blanks, or click blank then click option'
Acheckout
Bbranch
Ccommit
Dmerge
Attempts:
3 left
💡 Hint
Common Mistakes
Using checkout to create a branch without -b.
Using commit or merge which are unrelated.
4fill in blank
hard

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

Git
git [1] -[2] test
Drag options to blanks, or click blank then click option'
Acheckout
Bb
Cc
Dbranch
Attempts:
3 left
💡 Hint
Common Mistakes
Using branch with -c which is invalid.
Forgetting the dash before the option letter.
5fill in blank
hard

Fill all three blanks to delete a local branch named 'old-feature' safely.

Git
git [1] -[2] [3]
Drag options to blanks, or click blank then click option'
Abranch
Bd
Cold-feature
DD
Attempts:
3 left
💡 Hint
Common Mistakes
Using uppercase -D which forces deletion.
Trying to delete with git checkout.