Recall & Review
beginner
What does rebasing do to your commit history in Git?
Rebasing moves your branch's commits to start from the latest commit of the target branch, creating a straight, linear sequence of commits.
Click to reveal answer
intermediate
How does rebasing differ from merging in terms of commit history?
Merging combines branches by creating a new merge commit, preserving the branch structure, while rebasing rewrites commits to create a linear history without merge commits.
Click to reveal answer
beginner
Why is a linear history beneficial in Git?
A linear history is easier to read and understand because it shows a clear, step-by-step progression of changes without complex branching paths.
Click to reveal answer
intermediate
What happens to your commits during a rebase?
Your commits are temporarily saved, the branch is moved to the new base commit, then your commits are reapplied one by one on top of that base.
Click to reveal answer
intermediate
Can rebasing change commit hashes? Why?
Yes, because rebasing creates new commits based on the old ones but with a different parent, resulting in new commit hashes.
Click to reveal answer
What is the main effect of rebasing a branch in Git?
✗ Incorrect
Rebasing moves commits to a new base, making the history linear.
Which Git command rewrites commit history to be linear?
✗ Incorrect
git rebase reapplies commits on top of another base commit, creating linear history.
What does rebasing do to commit hashes?
✗ Incorrect
Rebasing creates new commits with new hashes because the parent commit changes.
Why might developers prefer rebasing over merging?
✗ Incorrect
Rebasing keeps history simple and linear, making it easier to follow.
What happens to your commits during a rebase?
✗ Incorrect
Git saves your commits, moves the branch, then reapplies commits on top.
Explain in your own words why rebasing creates a linear history in Git.
Think about how commits are moved and reapplied on top of another branch.
You got /5 concepts.
Describe the difference between rebasing and merging regarding commit history.
Consider how each command affects the shape of the commit graph.
You got /5 concepts.