-
Notifications
You must be signed in to change notification settings - Fork 0
pullrequest.html#quick guide
Source: https://cpython-devguide.readthedocs.io/pullrequest.html#quick-guide
Clear communication is key to contributing to any project, especially an Open Source project like Python. To ensure that the technical workflow runs smoothly, here is a quick overview of how to make a contribution to CPython on Github:
- Create an Issue that describes your change, if it doesn't exist and you're explicitly working on something
- Get started and set up your system
- Fork CPython on Github (using the Fork button in the upper-right on Github)
- Compile Python on your system
- Run tests after you have built Python
- Add an "upstream" Remote in Git on your system
- Create a Branch in Git where you can work on changes
- Commit changes and resolve conflicts in Git
- Run tests again
- Push commits to your Github repo
- Create Pull Request in Github to merge a branch from your Fork
- Celebrate! You just contributed to Python. :)
Set up your system:
git clone git@github.com:YOUR_GITHUB_ID/cpython.git
(replace YOUR_GITHUB_ID with your Github account name)
git remote add upstream git://github.com/python/cpython.git
Work on new features or fixes:
git checkout -b MY_NEW_FEATURE upstream/master
git commit
(as you work, create a separate commit for each bug fix, feature change, style or copy edit please)
git fetch upstream
git rebase -i upstream/master
(using rebase -i lets you verify what you commit and squish small commits)
git push origin HEAD
When you're ready, make a Pull Request on Github and refer to your MY_NEW_FEATURE branch.
* Though submitting a Pull Request on Github is the preferred method of contribution, you can alternatively Upload a Patch to bugs.python.org