Backport commits in PR instead of merge commit
See original GitHub issueCurrently when one runs
backport --pr 123
it seems that the tool searches for the merge commit that merged PR 123 into the master branch and then (I assume) it backports that merge commit.
This approach has two drawbacks:
- It’s only possible to backport PRs that have already been merged
- It (presumably) does not allow for an easy way to backport the individual commits of a PR
To 1): We have a few CI runs that take a while to complete and sometimes I already know that I want to backport a PR before these checks have completed (and thus before we have merged the PR). In that case it’d be nice if I could already create the backport PR in order to give its checks a bit of a headstart so I don’t have to wait that long for them to complete after having merged the original PR.
To 2): We don’t backport merge commits. Instead we cherry-pick the commits of a particular PR on the backport branch and then create a PR from that. It would be nice if there was an easy way to automate this process using the backport tool. (If that is already possible, please let me know how)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7 (3 by maintainers)

Top Related StackOverflow Question
Sorry for not having gotten back to you earlier. Just wanted to let you know that this now seems to work like charm 👍
I’ve published a beta version of backport that will allow you to backport all the commits in the PR instead of the merge commit:
Please try it out and let me know how it goes.