Git · Senior · Question 21 of 76

What does git rebase --update-refs help with in stacked branches?

Explanation

With PR #2 based on PR #1, rebasing the top branch also moves branch #1 to its rewritten commits, so the whole stack stays consistent.

Further reading

Problem with a question

Git · Senior · question 21

Test yourself

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

Take this quiz