Git · Middle · Question 1 of 75
What does git rebase main do on a feature branch?
- 1Moves
mainforward to the tip of the feature branch - ✓Correct answer: Replays the branch's commits on top of the latest
main - 3Merges
maininto the branch with a merge commit
Explanation
Each feature commit is re-applied on the new base, producing new commits with new hashes. The result is a linear history, as if you had started the branch from today's main.