Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitHub: How to update the code diff on an open PR?

Tags:

git

github

Git branch history I created Branches A,B,C. B has all changes of A, C has all changes of B.

I then created PRs for all of them seperately.

PR1 has: Changes of A PR2 has: Changes of A and B

Then I commited PR1.

What I would expect to happen: PR2 (and 3) would update their code differences. --> PR2 has: Changes of only B (and not A anymore)

PR2 still has all changes of A shown in the log - despite these changes already existing on MAIN, there are shown as code differences.

GitHub already allows changes to an open PR by committing to that branch - but apparently does not update the history in cases like this one.

Is there any like - "update" button to reflect the changes? The shown falsy code differences due to a merge make it harder to review a PR imo

like image 985
Nivia Avatar asked Oct 23 '25 13:10

Nivia


1 Answers

PR should be updated automatically. If that doesn't happen try changing the target branch to something else and changing it back to main.

like image 60
EmilioPelaez Avatar answered Oct 25 '25 06:10

EmilioPelaez



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!