Git · Middle · Question 1 of 75

What does git rebase main do on a feature branch?

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.

Further reading

Problem with a question

Git · Middle · question 1

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