| 210 | |
| 211 | === Checking out pull requests locally === |
| 212 | |
| 213 | A convenient way to checkout a pull request for testing purposes is using the following command pattern: |
| 214 | |
| 215 | {{{#!sh |
| 216 | # assuming that "upstream" points to OSGeo/grass |
| 217 | |
| 218 | git fetch upstream pull/<id>/head:<branch> |
| 219 | }}} |
| 220 | |
| 221 | The `<id>` is the ID number and `<branch>` is the branch name of the pull request. |
| 222 | |
| 223 | For example, using this information on a PR as displayed on !GitHub: |
| 224 | {{{ |
| 225 | Fix this error #123 |
| 226 | Someone wants to merge 3 commits into OSGeo:master from Someone:fix-this-error |
| 227 | }}} |
| 228 | the command would look like: |
| 229 | {{{#!sh |
| 230 | git fetch upstream pull/123/head:fix-this-error |
| 231 | |
| 232 | # then proceed to checkout for testing |
| 233 | git checkout fix-this-error |
| 234 | |
| 235 | # after testing, you may delete locally |
| 236 | git checkout master |
| 237 | git branch -D fix-this-error |
| 238 | }}} |
| 239 | |