Lesson 8 of 51 ~6 min
Course progress
0%

Quiz: Branching and Merging

Test your knowledge of creating branches, switching, merging, and resolving conflicts.

Which command creates and switches to a new branch named feature/x?

git branch feature/x && git checkout feature/x
git switch -c feature/x
git create-branch feature/x

After finishing work on feature/x, how do you merge it into main?

git merge main into feature/x
git switch feature/x && git merge main
git switch main && git merge feature/x

What typically causes a merge conflict?

Too many commits on a branch
Concurrent changes to the same lines in the same files
Using git switch instead of git checkout

How do you mark a conflicted file as resolved after editing it?

git resolve file.txt
git add file.txt
git commit —resolved

Which statement about fast-forward merges is true?

If main has not diverged, Git can simply move the branch pointer forward
They always create a merge commit
They require using —no-ff