Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions patchback/event_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,29 +58,29 @@
instructions you'll refer to it by the name `upstream`. If you don't
have it, here's how you can add it:
```console
$ git remote add upstream {git_url}
git remote add upstream {git_url}
```
3. Ensure you have the latest copy of upstream and prepare a branch
that will hold the backported code:
```console
$ git fetch upstream
$ git checkout -b {backport_pr_branch} upstream/{target_branch}
git fetch upstream
git checkout -b {backport_pr_branch} upstream/{target_branch}
```
4. Now, cherry-pick PR #{pr_number} contents into that branch:
```console
$ git cherry-pick -x {pr_merge_commit}
git cherry-pick -x {pr_merge_commit}
```
If it'll yell at you with something like `fatal: Commit {pr_merge_commit} is
a merge but no -m option was given.`, add `-m 1` as follows intead:
```console
$ git cherry-pick -m1 -x {pr_merge_commit}
git cherry-pick -m1 -x {pr_merge_commit}
```
5. At this point, you'll probably encounter some merge conflicts. You must
resolve them in to preserve the patch from PR #{pr_number} as close to the
original as possible.
6. Push this branch to your fork on GitHub:
```console
$ git push origin {backport_pr_branch}
git push origin {backport_pr_branch}
```
7. Create a PR, ensure that the CI is green. If it's not — update it so that
the tests and any other checks pass. This is it!
Expand Down