| | 1 | Document status: Proposal |
| | 2 | |
| | 3 | = Contributing to WebKit using GitHub = |
| | 4 | |
| | 5 | TODO: Add an overview for what you might want to do this. |
| | 6 | |
| | 7 | == Setup == |
| | 8 | |
| | 9 | 1. Create a GitHub account (if you don't already have one) |
| | 10 | 1. Fork https://github.com/WebKit/webkit |
| | 11 | 1. $ git clone git@github.com:yourname/webkit.git |
| | 12 | |
| | 13 | == Writing code == |
| | 14 | |
| | 15 | 1. $ git checkout master -b awesomefeature |
| | 16 | 1. Write some awesome code. |
| | 17 | 1. Commit locally and push to origin (your GitHub account) as you normally would with git. |
| | 18 | |
| | 19 | == Tracking upstream == |
| | 20 | |
| | 21 | 1. One-time setup: $ git remote add upstream git://github.com/WebKit/webkit.git |
| | 22 | 1. $ git fetch upstream |
| | 23 | 1. $ git merge upstream/master |
| | 24 | 1. $ git push origin master |
| | 25 | |
| | 26 | If you never modify your local master branch, merging upstream/master will always be a fast-forward merge (i.e., no merge conflicts). You can then merge these new commits into your in-flight feature branches as you normally would with git. |
| | 27 | |
| | 28 | == Getting your code reviewed == |
| | 29 | |
| | 30 | 1. Find a reviewer who is interested in reviewing your awesome feature. |
| | 31 | 1. Create a pull request by going to https://github.com/yourname/webkit/pull/new/awesomefeature |
| | 32 | 1. Click the "Change Commits" button to select that reviewer's base branch of WebKit. TODO: Investigate whether we can make reviewers members of the "WebKit" organization so you can just use WebKit/webkit@master as the base branch. |
| | 33 | 1. Write a helpful description of your pull request and click "Send pull request". |
| | 34 | 1. Iterate with the reviewer as usual using GitHub's review tools. |
| | 35 | |
| | 36 | == Accepting a pull request == |
| | 37 | |
| | 38 | |