...
A backport commit is considered clean if the changes in the original commit are identical to the changes in the backport commit. Note that only the changes has have to be identical, not the changed lines.
...
Navigate the to commit indented to be backported in the source code hosting provider's web UI and issue the /backport commit command. If the commit applied cleanly onto the target repository then go to the pull request linked in the reply and issue the /sponsorintegrate pull request command.
If the commit did not apply cleanly then the commit must be backport manually and backport pull request must be created manually. See the CLI section for an example of how to do this using the command-line.
...
Use the Skara CLI tool git-backport to try to automatically create a backport pull request for the given commit, for example:
Code Block |
---|
git backport https://github.com/openjdk/jdk 5a526c1c5716f6d9a7fc94741bcdb2f424d342df |
...
If the commit applied cleanly onto the target repository then sponsor integrate the resulting backport pull request with git-pr sponsorintegrate, for example:
Code Block |
---|
git pr |
...
integrate 17 |
...
If the commit could not be applied cleanly, then the conflicts must be manually resolved. After the conflicts have been resolved then a pull request must be created with the title "Backport <hash>". An example of how to do this is shown below:
Code Block |
---|
$ git checkout -b backport-5a526c1c $ git fetch https://github.com/openjdk/jdk 5a526c1c5716f6d9a7fc94741bcdb2f424d342df $ git cherry-pick --no-commit FETCH_HEAD $ # resolve conflicts $ git commit -m 'Backport 5a526c1c5716f6d9a7fc94741bcdb2f424d342df' $ git push -u origin backport-5a526c1c |
The output from the final git push
will return a link that can be used to create the pull request.
...