0
0
Gitdevops~10 mins

Feature branch workflow 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 feature branch named 'feature1'.

Git
git checkout -b [1]
Drag options to blanks, or click blank then click option'
Adevelop
Bmain
Cfeature1
Dmaster
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'main' or 'master' instead of the new feature branch name.
Forgetting the '-b' flag to create the branch.
2fill in blank
medium

Complete the command to push the feature branch 'feature1' to the remote repository.

Git
git push origin [1]
Drag options to blanks, or click blank then click option'
Afeature1
Bmain
Cdevelop
Dmaster
Attempts:
3 left
💡 Hint
Common Mistakes
Pushing the 'main' or 'master' branch instead of the feature branch.
Omitting the remote name 'origin'.
3fill in blank
hard

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

Git
git checkout main
 git [1] feature1
Drag options to blanks, or click blank then click option'
Amerge
Bpush
Ccommit
Dbranch
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'push' instead of 'merge'.
Using 'commit' or 'branch' which do not merge branches.
4fill in blank
hard

Fill both blanks to create a feature branch from 'develop' and switch to it.

Git
git checkout [1] [2] feature2
Drag options to blanks, or click blank then click option'
A-b
B-d
Cdevelop
Dmain
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-d' which deletes branches instead of '-b'.
Using 'main' instead of 'develop' as the base branch.
5fill in blank
hard

Fill all three blanks to delete a local feature branch named 'feature2' after merging.

Git
git [1] -[2] [3]
Drag options to blanks, or click blank then click option'
Abranch
Bdelete
Cfeature2
Dd
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'delete' instead of 'branch' as the git command.
Using '-delete' instead of '-d' as the flag.
Deleting the wrong branch name.