You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 18, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 18, 2021. It is now read-only.
amending PR branches via force-push causes unreachable commits to vanish from web UI #998
When you want to amend a pull request, you have a choice of two ways to do it:
Push new commits on top of the head of the existing PR branch
Force-push (git push -f) a new head to the PR branch, thereby rewriting history.
Unfortunately currently both have significant problems, as explained in this issue's sibling #997.
This issue is for tracking just one of the problems with the second (force-push) approach: amending PR branches via force-push causes unreachable commits to vanish from the web UI. (#997 and #999 document other, separate problems with this approach.)
Just realised this is not actually fully resolved, because GitHub decided to hide force pushes which are followed by other force-pushes 🤦♂️
I can understand the desire to avoid cluttering the UI with lots of force-pushes, but if GitHub wanted to hide old branch tips they should have provided an option to expose them again. Unfortunately the current approach makes it very hard to retrieve these old branch tips (I guess the API is the only way) or maybe even impossible if #997 bites.
Activity
aspiers commentedon Nov 22, 2018
Thanks to @KaelWD for noting that force pushes are now shown in the PR history:
This was also announced in GitHub's Changelog, albeit with very few details given.
So I think this is now resolved! It also moves #999 closer to a resolution, which is great news.
aspiers commentedon Apr 11, 2019
Just realised this is not actually fully resolved, because GitHub decided to hide force pushes which are followed by other force-pushes 🤦♂️
I can understand the desire to avoid cluttering the UI with lots of force-pushes, but if GitHub wanted to hide old branch tips they should have provided an option to expose them again. Unfortunately the current approach makes it very hard to retrieve these old branch tips (I guess the API is the only way) or maybe even impossible if #997 bites.