Preserve commit hashes when retargeting stacked PRs after a parent merge #214665
Unanswered
vlad-saftoiu
asked this question in
Pull Requests
Replies: 1 comment
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Product Feedback
Body
Hello! We've been using stacked PRs lately, but we stumbled upon something that we consider an issue: when merging a lower PR in the stack, all the upper PRs gets their commits (and dates) rewritten (with their CI re-triggered).
Also, while the rewrite keeps the original author date, the front date after a merge will be the date of the merge itself.
We always use Merge method, no squash and no rebase; thus we think it will be very nice to have an option to NOT rewrite all the upper PRs commits in the stack.
In other words, when a lower PR is merged and its original commits remain ancestors of the destination branch, allow the immediately upper PR to be retargeted without rebasing.
This would preserve commit hashes and committer dates, avoiding unnecessary history rewrites. Rebase only when required, for example, after a squash merge.
All reactions