127 | | Go to your repository page on github |
| 129 | {{{#!sh |
| 130 | git checkout develop |
| 131 | git remote add github https://github.com/SantanderMetGroup/DRM4G.git #just do run this command the first time to add the main repository to the list of your remotes |
| 132 | git pull github develop |
| 133 | }}} |
| 134 | |
| 135 | If there have been any changes, but there are no conflicts, you can just ''push'' your changes into your remote repository. |
| 136 | |
| 137 | {{{#!sh |
| 138 | git push origin develop |
| 139 | }}} |
| 140 | |
| 141 | In the case that there are conflicts, resolve them and commit the changes, after do the ''push'' to update your remote repository. |
| 142 | |
| 143 | After, you just have to go to your repositories web page and click on the "'''''New pull request'''''" button. |
| 144 | |
| 145 | |
| 146 | [[Image(pull_request_button.png)]] |
| 147 | |
| 148 | A message will tell you if there are any conflicts that need to be solved or if an automatic merge is possible. Then you just have to click on the "'''''Create pull request'''''", give this merge a title (which will serve as the commit message if the pull request is accepted), a comment if you want (can be useful to explain in more detail why this should be integrated into the DRM4G), and click a second time on the "'''''Create pull request'''''" button. |
| 149 | |
| 150 | Now you'll have to wait and see if the administrator of the project accepts the changes you're proposing. |
| 156 | |
| 157 | |
| 158 | Another option would be to create a new branch from the "'''develop'''" branch and then try to make a pull request from that. |
| 159 | |
| 160 | {{{#!sh |
| 161 | git checkout develop |
| 162 | git checkout -b new_branch |
| 163 | #make some changes |
| 164 | git add . |
| 165 | git commit -m "Description of the changes you've made" |
| 166 | git push origin new_branch |
| 167 | }}} |
| 168 | |
| 169 | |
| 170 | |
| 171 | [[br]] |
| 172 | [[br]] |
| 173 | [[br]] |
| 174 | [[br]] |
| 175 | [[br]] |
| 176 | [[br]] |
| 177 | For the administrator of the DRM4G's !GitHub repository: |
| 178 | |
| 179 | When you see that there's a new pull request, either because you saw it on the projects page or because you received a message in your mail informing you about it, you can click on the "'''''Pull requests'''''" button. |
| 180 | |
| 181 | [[Image(view_pull_requests_button.png)]] |
| 182 | |
| 183 | |
| 184 | * If you agree with the changes made, and there are no conflicts, you can just click on the "'''''Merge pull request'''''" button. |
| 185 | * You'll automatically see a commit message that will look something like this: "__Merge pull request #X from <contributor>/<branch_name>__" |
| 186 | * Bellow that, you can write an "optional extended description". |
| 187 | * When running `git log` from the command line, you'll just see both lines shown as the commit message. |
| 188 | * If don't agree or there are conflicts, you can click right next to the "Merge pull request" button, where it says "'''''command line instructions'''''" to perform a manual merge. |
| 189 | * Just follow the instructions shown there. |
| 190 | * Optionally, you could also try to solve the conflicts wiht the web editor, but this isn't recommended since you can't test what you're changing, unless the conflict is in a comment or a text message, not in the code. |
| 191 | |
| 192 | [[Image(merge_pull_request_button.png)]] |