0
0
Gitdevops~10 mins

Octopus merge for multiple branches 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 start an octopus merge with branches feature1 and feature2.

Git
git merge [1] feature1 feature2
Drag options to blanks, or click blank then click option'
A--octopus
B--no-ff
C--squash
D--rebase
Attempts:
3 left
💡 Hint
Common Mistakes
Using --no-ff merges only one branch and fast-forwards if possible.
Using --squash combines changes but does not create a merge commit.
Using --rebase rewrites history instead of merging.
2fill in blank
medium

Complete the command to merge branches featureA, featureB, and featureC into the current branch using octopus merge.

Git
git merge [1] featureA featureB featureC
Drag options to blanks, or click blank then click option'
A--squash
B--ff-only
C--no-commit
D--octopus
Attempts:
3 left
💡 Hint
Common Mistakes
Using --squash merges changes without a merge commit.
Using --no-commit merges but pauses before committing.
Using --ff-only refuses merge if fast-forward is not possible.
3fill in blank
hard

Fix the error in the command to merge branches bugfix1 and bugfix2 using octopus merge.

Git
git merge [1] bugfix1 bugfix2
Drag options to blanks, or click blank then click option'
A--no-ff
B--rebase
C--octopus
D--squash
Attempts:
3 left
💡 Hint
Common Mistakes
Placing options after branch names causes errors.
Using --rebase rewrites history instead of merging.
Using --squash does not create a merge commit.
4fill in blank
hard

Fill both blanks to create an octopus merge of branches dev1 and dev2 with a custom commit message.

Git
git merge [1] dev1 dev2 -m [2]
Drag options to blanks, or click blank then click option'
A--octopus
B"Merge multiple dev branches"
C"Combined dev1 and dev2"
D--no-ff
Attempts:
3 left
💡 Hint
Common Mistakes
Using --no-ff does not merge multiple branches at once.
Providing no commit message can make history unclear.
Placing the option after branch names causes errors.
5fill in blank
hard

Fill all three blanks to create an octopus merge of branches alpha, beta, and gamma with a descriptive message.

Git
git merge [1] [2] alpha beta gamma -m [3]
Drag options to blanks, or click blank then click option'
A--octopus
B--no-ff
C"Merge alpha, beta, and gamma branches"
D--squash
Attempts:
3 left
💡 Hint
Common Mistakes
Using --squash removes merge commits.
Omitting --no-ff can fast-forward and lose merge history.
Placing options after branch names incorrectly.