0
0
Gitdevops~5 mins

Three-way merge in Git - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a three-way merge in Git?
A three-way merge in Git combines changes from two branches using a common base version to create a new merged version.
Click to reveal answer
beginner
What are the three points used in a three-way merge?
The three points are: the base (common ancestor), the source branch, and the target branch.
Click to reveal answer
intermediate
Why is the base version important in a three-way merge?
The base version helps Git understand what changed in each branch to combine changes correctly and detect conflicts.
Click to reveal answer
intermediate
What happens if changes conflict during a three-way merge?
Git marks the conflict and pauses the merge so you can manually fix the conflicting parts before completing the merge.
Click to reveal answer
beginner
How do you start a three-way merge in Git?
You run 'git merge ' while on the target branch to merge changes from the source branch.
Click to reveal answer
What does the 'base' represent in a three-way merge?
AThe latest commit on the source branch
BThe common ancestor commit of both branches
CThe latest commit on the target branch
DThe commit with conflicts
Which Git command initiates a three-way merge?
Agit merge <branch-name>
Bgit rebase <branch-name>
Cgit commit
Dgit checkout <branch-name>
What does Git do when it detects conflicts during a three-way merge?
AIgnores conflicts and completes the merge
BAutomatically discards conflicting changes
CStops and asks you to resolve conflicts manually
DDeletes the source branch
Why is a three-way merge better than a two-way merge?
AIt uses the base version to understand changes from both branches
BIt merges only one branch
CIt deletes the base branch
DIt avoids any conflicts
Which of these is NOT part of a three-way merge?
ABase commit
BSource branch commit
CTarget branch commit
DRemote repository URL
Explain the process of a three-way merge in Git and why it is useful.
Think about how Git uses three points to combine changes safely.
You got /5 concepts.
    Describe what happens when Git encounters conflicts during a three-way merge and how you resolve them.
    Focus on the steps after conflicts appear.
    You got /5 concepts.