Git · Senior · Question 47 of 76

What happens to open pull requests when you rewrite main's history?

Explanation

PR branches still contain the old commits, so the diff against the new main includes them. Every branch has to be rebased with --onto, which is why rewriting shared history needs coordination.

Further reading

Problem with a question

Git · Senior · question 47

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