Recall & Review
beginner
What does the
git merge command do?It combines changes from one branch into another branch, integrating the histories.
Click to reveal answer
beginner
What is a 'merge conflict' in Git?
A situation where Git cannot automatically combine changes because the same part of a file was changed differently in the branches being merged.
Click to reveal answer
intermediate
How do you resolve a merge conflict?
You manually edit the conflicting files to choose or combine changes, then mark the conflict as resolved by adding the files and committing.
Click to reveal answer
intermediate
What does the command
git merge --no-ff do?It forces Git to create a merge commit even if the merge could be done with a fast-forward, preserving the branch history.
Click to reveal answer
beginner
What is a 'fast-forward' merge?
A merge where the current branch pointer is simply moved forward to the target branch because there are no divergent changes.
Click to reveal answer
What happens when you run
git merge feature while on the main branch?✗ Incorrect
The
git merge command integrates changes from the specified branch into the current branch.Which command helps you see which files have conflicts after a merge?
✗ Incorrect
git status shows files with conflicts needing resolution.What does a 'fast-forward' merge mean?
✗ Incorrect
Fast-forward means no new commit is created; the branch pointer just moves forward.
How do you force Git to create a merge commit even if fast-forward is possible?
✗ Incorrect
The
--no-ff option forces a merge commit.What should you do after fixing merge conflicts manually?
✗ Incorrect
After resolving conflicts, you stage the files and commit to complete the merge.
Explain the process and purpose of the
git merge command.Think about how two different versions of a project come together.
You got /4 concepts.
Describe what a merge conflict is and how you would resolve it in Git.
Imagine two friends editing the same sentence differently.
You got /4 concepts.