0
0
Gitdevops~10 mins

Merge strategies overview 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 merge branch 'feature' into the current branch using the default merge strategy.

Git
git merge [1]
Drag options to blanks, or click blank then click option'
Acheckout
Bcommit
Cfeature
Drebase
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'commit' instead of the branch name.
Confusing 'rebase' with 'merge'.
Using 'checkout' which switches branches instead of merging.
2fill in blank
medium

Complete the command to merge branch 'feature' using the 'ours' merge strategy.

Git
git merge -s [1] feature
Drag options to blanks, or click blank then click option'
Arecursive
Bours
Cresolve
Doctopus
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'recursive' which is the default strategy.
Using 'resolve' which is for simple merges.
Using 'octopus' which is for merging multiple branches.
3fill in blank
hard

Fix the error in the command to merge branch 'feature' using rebase instead of merge.

Git
git [1] feature
Drag options to blanks, or click blank then click option'
Acommit
Bmerge
Ccheckout
Drebase
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'merge' which combines branches without rewriting history.
Using 'checkout' which switches branches.
Using 'commit' which records changes.
4fill in blank
hard

Fill both blanks to create a merge commit with a custom message and no fast-forward.

Git
git merge --no-[1] -m [2] feature
Drag options to blanks, or click blank then click option'
Aff
B"Merge commit created"
C"Custom merge message"
Dsquash
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'squash' instead of 'ff' for the first blank.
Not quoting the commit message.
Using default merge without message.
5fill in blank
hard

Fill all three blanks to create a squash merge with a custom message and no commit.

Git
git merge --squash --no-[1] --[2] -m [3] feature
Drag options to blanks, or click blank then click option'
Aff
Bcommit
C"Squash merge without commit"
Dno-commit
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'commit' instead of 'no-commit' for the second blank.
Omitting quotes around the commit message.
Using fast-forward merge instead of squash.