3 ms·
In practice it’s fine to rebase and force push to your own published branch, even when it’s an open PR. Just mark it draft or otherwise communicate when it’s n
by MrDarcy 2y ago
In practice it’s fine to rebase and force push to your own published branch, even when it’s an open PR.
Just mark it draft or otherwise communicate when it’s no longer a moving target.
- singpolyma3 2y agoEspecially when it's an open PR. That's effectively essential in order to, say, address feedback
- spankalee 2y agoI try not to rebase and force push for branches under active review though. It makes it much harder for the reviewer to see the changes that have happened since they last reviewed.
- argulane 2y agoThat's only a problem when using GitHub. GitLab and Gerrit correctly version such force push PR updates and provide a nice view of what has changed.
- everybodyknows 2y agoI version-number PR branches for upstreams on GitHub. If my branch 'for-upstream-13.0' does not apply cleanly on top of upstream 'main', I sync my fork's 'main' to upstream in GitHub's Web GUI, fetch to my desktop, and build a new 'for-upstream-13.1' on top, with the help of git-cherry-pick. Might need a new PR. All history is preserved, both on GH and locally.