Description
The pullrequest page should include a step-by-step list with the required git commands required to create a pull request.
The list should be something like:
- Create your fork of CPython by clicking on the "Fork" button on https://github.com/python/cpython
- Create a local clone of your fork by doing
git clone https://github.com/your-username/cpython
cd
in thecpython
dir and create a new branch withgit checkout -b branch-name
- Edit the files that you want to change
- Run the tests with
./python -m test
andmake patchcheck
- Commit the changes with
git commit -am 'bpo-NNNNN: message'
- Push the changes to your repo with
git push -u origin branch-name
- Create a pull request by clicking on the "Create pull request" button
- Add a comment and submit the pull request.
The list can include links to relevant sections (e.g. how to run the tests) and mention that the first two steps are optional. Instead of a list, something like the following is also ok:
# clone your fork of CPython
git clone https://github.com/your-username/cpython
cd cpython
# create new branch
git checkout -b branch-name
# edit the files you want to change and run the tests
./python -m test
# check the patch
make patchcheck
# commit the changes
git commit -am 'bpo-NNNNN: message'
# push them to your fork
git push -u origin branch-name
This can be prefixed by a paragraph explaining how to create your own fork, and followed by one that explains how to create the PR after the push.
Also note that there's some overlapping with the committing page that also includes some command and some steps that should be included in this list (e.g. the minimal configuration and initial setup). I think it would be better to have everything in a single page with additional subsections for core-devs-specific steps.