diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 81c06a21bfa..bd3af9f4635 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -101,6 +101,21 @@ So to start working on a new PR, you need to follow these commands: $ git checkout -b name-new-branch ``` +### Changing base branch + +If you started your work in the wrong branch, or want to backport it, you could +change the base branch using `git rebase --onto` + +```bash + $ git rebase --onto +``` + +For example, backporting `your_branch` from `master` to `3.x`: + +```bash + $ git rebase --onto 3.x master your_branch +``` + ## Running Tests Install our test dependencies: