Git · Middle · Question 3 of 75

Merge vs rebase for integrating main into a feature branch: what's the trade-off?

Explanation

Merge preserves exactly what happened and adds merge commits; rebase produces a clean line that's easier to read and bisect, at the cost of new hashes. Teams pick one convention.

Further reading

Problem with a question

Git · Middle · question 3

Test yourself

Take the Git · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz