Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f899455

Browse files
louisrawlinsMariatta
authored andcommitted
Add Pull Request Step-By-Step Guide (#140)
Closes #103
1 parent 056a2da commit f899455

File tree

2 files changed

+83
-0
lines changed

2 files changed

+83
-0
lines changed

committing.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,8 @@ After that, your remotes configuration should look like this::
346346
At any point in time you can use SSH-based URL instead of HTTPS-based ones.
347347

348348

349+
.. _committing-push-changes:
350+
349351
Pushing changes
350352
'''''''''''''''
351353

@@ -381,6 +383,8 @@ The above steps can be executed against any branch you wish to, just replace mas
381383
with an appropriate branch name.
382384

383385

386+
.. _committing-active-branches:
387+
384388
Active branches
385389
---------------
386390

pullrequest.rst

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,85 @@ command (after any successful build of Python)::
9494

9595
.. _cla:
9696

97+
.. _pullrequest-quickguide:
98+
99+
Quick Guide
100+
'''''''''''
101+
102+
`Clear communication`_ is key to contributing to any project, especially an
103+
`Open Source`_ project like Python.
104+
105+
Here is a quick overview of how you can contribute to CPython on GitHub:
106+
107+
1. If an Issue doesn't exist, `create an Issue`_ that describes your change
108+
109+
2. :ref:`Get started <setup>` and set up your system
110+
111+
3. Fork `CPython`_ on GitHub (using the Fork button in the upper-right on GitHub)
112+
113+
4. :ref:`Build Python <compiling>` on your system
114+
115+
5. :ref:`Run tests <runtests>` after you have built Python
116+
117+
6. :ref:`Add an "upstream" Remote in Git <remote-configuration>` (using SSH, or you can `use HTTPS`_)
118+
119+
7. :ref:`Create a Branch in Git <pullrequest-steps>` where you can work on changes
120+
121+
8. :ref:`Run tests <runtests>` again
122+
123+
9. :ref:`Push commits <committing-push-changes>` to your Github repo
124+
125+
10. `Create Pull Request`_ in Github to merge a branch from your Fork
126+
127+
11. Review and address `comments on your Pull Request`_
128+
129+
12. When your changes are merged, celebrate contributing to Python! :)
130+
131+
.. _Clear communication: https://opensource.guide/how-to-contribute/#how-to-submit-a-contribution
132+
.. _Open Source: https://opensource.guide/
133+
.. _create an Issue: https://bugs.python.org/
134+
.. _CPython: https://github.com/python/cpython
135+
.. _use HTTPS: https://help.github.com/articles/which-remote-url-should-i-use/
136+
.. _Create Pull Request: https://help.github.com/articles/creating-a-pull-request/
137+
.. _comments on your Pull Request: https://help.github.com/articles/commenting-on-a-pull-request/
138+
139+
140+
.. _pullrequest-steps:
141+
142+
Quick Guide Step-by-step
143+
''''''''''''''''''''''''
144+
145+
Set up your system (using SSH, or you can `use HTTPS`_)::
146+
147+
git clone [email protected]:YOUR_GITHUB_ID/cpython.git
148+
149+
Replace **YOUR_GITHUB_ID** with your GitHub account name above, then add upstream (using SSH, or you can `use HTTPS`_)::
150+
151+
git remote add upstream git://github.com/python/cpython.git
152+
153+
Work on new features or fixes::
154+
155+
git checkout -b MY_BRANCH_NAME upstream/master
156+
157+
As you work, commit changes::
158+
159+
git commit
160+
161+
Then fetch upstream to see if anything conflicts with your changes::
162+
163+
git fetch upstream
164+
165+
Then push your work to your clone on GitHub::
166+
167+
git push origin MY_BRANCH_NAME
168+
169+
Make a Pull Request on GitHub from your changes in **MY_BRANCH_NAME**.
170+
171+
.. note::
172+
You can upload a patch to https://bugs.python.org/, but Pull Requests
173+
on GitHub are preferred.
174+
175+
97176
Licensing
98177
---------
99178

0 commit comments

Comments
 (0)