diff --git a/gitbootcamp.rst b/gitbootcamp.rst index 80daf1698..0f26aac10 100644 --- a/gitbootcamp.rst +++ b/gitbootcamp.rst @@ -199,18 +199,6 @@ Solution:: $ git push --force origin some-branch -Backporting Merged Changes --------------------------- - -A pull request may need to be backported into one of the maintenance branches -after it has been accepted and merged into ``master``. It is usually indicated -by the label ``needs backport to X.Y`` on the pull request itself. - -Use the utility script `cherry_picker.py `_ -from the `core-workflow `_ -repository to backport the commit. - - .. _git_from_mercurial: Applying a Patch from Mercurial to Git @@ -305,6 +293,34 @@ Pull requests can be accepted and merged by a Python Core Developer. 3. Press the ``Confirm squash and merge`` button. +Backporting Merged Changes +-------------------------- + +A pull request may need to be backported into one of the maintenance branches +after it has been accepted and merged into ``master``. It is usually indicated +by the label ``needs backport to X.Y`` on the pull request itself. + +Use the utility script `cherry_picker.py `_ +from the `core-workflow `_ +repository to backport the commit. + +The commit hash for backporting is the squashed commit that was merged to +the ``master`` branch. On the merged pull request, scroll to the bottom of the +page. Find the event that says something like:: + + merged commit into python:master ago. + +By following the link to ````, you will get the full commit hash. + +Alternatively, the commit hash can also be obtained by the following git commands:: + + $ git fetch upstream + $ git rev-parse ":/bpo-12345" + +The above commands will print out the hash of the commit containing ``"bpo-12345"`` +as part of the commit message. + + Editing a Pull Request Prior to Merging ---------------------------------------