Recall & Review
beginner
What is a merge commit in Git?
A merge commit is a special commit that combines the changes from two branches into one, preserving the history of both branches.
Click to reveal answer
beginner
Which Git command creates a merge commit by default when merging branches?
The command
git merge <branch-name> creates a merge commit by default if there are changes to combine.Click to reveal answer
beginner
What happens if there are no conflicts during a merge?
Git automatically creates a merge commit that combines the changes from both branches without manual intervention.
Click to reveal answer
intermediate
How can you avoid creating a merge commit when merging?
You can use
git merge --ff-only <branch-name> to only merge if a fast-forward is possible, avoiding a merge commit.Click to reveal answer
beginner
What is the purpose of the merge commit message?
The merge commit message explains which branches were merged and why, helping others understand the combined changes.
Click to reveal answer
Which command creates a merge commit in Git?
✗ Incorrect
The
git merge command combines branches and creates a merge commit if needed.What does a merge commit do?
✗ Incorrect
A merge commit combines the changes from two branches into one.
How do you prevent a merge commit during merge?
✗ Incorrect
Using
--ff-only merges only if a fast-forward is possible, avoiding a merge commit.What happens if there are conflicts during a merge?
✗ Incorrect
Conflicts must be resolved manually before the merge commit can be created.
Which branch is updated after a successful merge commit?
✗ Incorrect
The target branch is updated with the merge commit combining changes.
Explain what a merge commit is and why it is important in Git.
Think about how two sets of changes come together in one place.
You got /4 concepts.
Describe the steps Git takes when creating a merge commit and what happens if there are conflicts.
Consider what Git does automatically and what needs your help.
You got /4 concepts.