|
|
(29 intermediate revisions by 11 users not shown) |
Line 1: |
Line 1: |
− | The source code of the D compiler (dmd), runtime library (druntime), and standard library (Phobos), are all available at [https://github.com/D-Programming-Language GitHub].
| + | #REDIRECT [[Starting as a Contributor#Create_a_pull_request]] |
− | | |
− | ==Creating your fork==
| |
− | | |
− | To contribute to the D compiler, runtime library, or standard library, you need to create an account on GitHub, and then navigate to the [https://github.com/D-Programming-Language D programming language] page, select the project you wish to contribute to, and create a fork of that project.
| |
− | | |
− | For example, if you wish to submit a patch to the D compiler, you should navigate to [https://github.com/D-Programming-Language/dmd D-Programming-Language/dmd], then click on the "Fork" button at the top right corner of the page. This will clone the D compiler sources into your list of projects.
| |
− | | |
− | ==Checkout the sources==
| |
− | | |
− | {{seealso|Using Git on Windows}}
| |
− | | |
− | Once you have forked the project you wish to contribute to, use git to checkout a local copy of the project.
| |
− | | |
− | Generally, you should checkout a copy of at least dmd, druntime, and phobos in order to have a working compiler toolchain that you can use to test your changes.
| |
− | | |
− | After checking out the sources, you will probably want to know [[how to build git master]].
| |
− | | |
− | ==Make your changes in a branch==
| |
− | | |
− | Generally, it is preferred that any changes you wish to contribute should be made in its own dedicated topic branch. For example, if you have a fix for issue 1234 in the D compiler, you might want to do something like this:
| |
− | | |
− | <pre>
| |
− | % cd /usr/src/d/dmd/src
| |
− | % git checkout -b issue_1234
| |
− | % vim expression.c # make your changes here
| |
− | % make -f posix.mak
| |
− | % ... # test your changes here
| |
− | % git commit -a # commit to the branch named 'issue_1234'
| |
− | % git push origin # push changes to your fork of DMD
| |
− | </pre>
| |
− | | |
− | ==Create a pull request==
| |
− | | |
− | Once you have tested all your changes and pushed them to your fork on GitHub, you are ready to submit a pull request.
| |
− | | |
− | # Navigate to your fork of the project on GitHub.
| |
− | # '''Important''': Select the branch that you made your changes in, say issue_1234.
| |
− | # Click on the "Pull Request" button.
| |
− | | |
− | This will submit your changes for review by the D maintainers. If your changes are approved, they will be merged into the master branch. Otherwise, if the maintainers have some comments or feedback, you can refine your changes by editing and testing in your local workspace, and pushing the new changes to the same git branch. The new changes will be automatically included in your pull request.
| |
− | | |
− | ===Rebasing===
| |
− | | |
− | '''TBD'''
| |