28 | | == Committing Code == |
29 | | See: http://eden.sahanafoundation.org/wiki/DeveloperGuidelines/Git |
| 28 | == Submitting Code == |
| 29 | |
| 30 | Please read this, about how to use git and GitHub, but we have some differences for GCI, which are explained below. |
| 31 | http://eden.sahanafoundation.org/wiki/DeveloperGuidelines/Git |
| 32 | |
| 33 | We will be using a GitHub repository just for GCI, rather than submitting code directly to the main repository. |
| 34 | This will help us conserve the time of the (very busy) folks who have to approve submissions to the main repository. |
| 35 | |
| 36 | (We are setting up the GCI repository now, and will post a link to it shortly, right here.) |
| 37 | |
| 38 | Also, we will use several branches in that GCI repository to receive the pull requests, to make it simpler and faster |
| 39 | to get them merged, as we can review and merge them in parallel. |
| 40 | |
| 41 | So, there will be two changes to the procedure for submitting code. |
| 42 | |
| 43 | When you have code ready for review by a mentor, ask which branch in the GCI repository you should send your pull request to. |
| 44 | The mentor will make sure this branch is up to date. |
| 45 | |
| 46 | The first steps to submit your work are the same as in the wiki page linked above. |
| 47 | * "Squash" your commits into one. |
| 48 | * Rebase from the main repository, so your branch is fully up to date, and has no conflicts. |
| 49 | * Push your commit to your Eden repository on GitHub. |
| 50 | * Open the GitHub page for your Eden repository. |
| 51 | * Click the "Compare and Create Pull Request" button shown on that commit. |
| 52 | |
| 53 | The next step is where the change comes in: |
| 54 | * The pull request page will have a line that shows which repository and branch you are sending the pull request too. |
| 55 | You will need to change both, to the GCI repository and the branch name supplied by the mentor. |
| 56 | * There will be a down-arrow next to the repository -- that will give you a list of repositories. Select the GCI repository. |
| 57 | * Then use the down-arrow on the branch -- select your branch. |
| 58 | * Create the pull request. |
| 59 | |
| 60 | Then: |
| 61 | * Continue with the code review as usual. |
| 62 | |
| 63 | After the mentor accepts your pull request, the GCI admins will collect your commits and those of other students into one |
| 64 | pull request each day (or every few days) and submit that to the main repository. Your commits will have your name on the, |
| 65 | and will show up in the main repository. |