Recall & Review
beginner
What is a merge strategy in Git?
A merge strategy is the method Git uses to combine changes from different branches into one. It decides how to integrate the histories and content.
Click to reveal answer
intermediate
Explain the recursive merge strategy.
The recursive strategy is Git's default. It handles two-parent merges by creating a new merge commit that combines changes from both branches, resolving conflicts if needed.
Click to reveal answer
intermediate
What does the ours merge strategy do?
The 'ours' strategy keeps the current branch's content and ignores changes from the other branch during a merge. It is useful to override changes.
Click to reveal answer
advanced
Describe the octopus merge strategy.
The octopus strategy merges more than two branches at once. It works best when there are no conflicts and creates a single merge commit.
Click to reveal answer
beginner
What is a fast-forward merge?
A fast-forward merge happens when the current branch has no new commits since branching. Git just moves the pointer forward without creating a merge commit.
Click to reveal answer
Which merge strategy is the default in Git?
✗ Incorrect
The recursive strategy is the default merge method Git uses for two-parent merges.
What does a fast-forward merge do?
✗ Incorrect
Fast-forward merges move the branch pointer forward when no new commits exist on the current branch.
When is the octopus merge strategy used?
✗ Incorrect
Octopus merges multiple branches simultaneously and works best when there are no conflicts.
What happens with the 'ours' merge strategy?
✗ Incorrect
'Ours' strategy keeps the current branch's content and ignores the other branch's changes.
Which merge strategy creates a new commit combining two branches?
✗ Incorrect
The recursive strategy creates a new merge commit combining changes from both branches.
Describe the main differences between fast-forward and recursive merge strategies in Git.
Think about whether a new commit is created or not.
You got /4 concepts.
Explain when and why you might use the 'ours' merge strategy.
Consider a situation where you want to discard incoming changes.
You got /4 concepts.