Changes between Version 76 and Version 77 of WorkingWithGit
- Timestamp:
- Feb 6, 2017, 9:49:36 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WorkingWithGit
v76 v77 248 248 This section describes how to work on a PR without the need to clone or pull from the PR author's repository. 249 249 250 Check out - according to [https://help.github.com/articles/checking-out-pull-requests-locally/ GitHub's help] - the pull request {{{#ID}}} to work on as a local branch 251 {{{ 252 git fetch originpull/ID/head:BRANCHNAME250 Check out - according to [https://help.github.com/articles/checking-out-pull-requests-locally/ GitHub's help] - the pull request {{{#ID}}} to work on as a local branch:{{{BRANCHNAME}}}: 251 {{{ 252 git fetch upstream pull/ID/head:BRANCHNAME 253 253 git checkout BRANCHNAME 254 254 }}} 255 then work an it as needed, commit and finally decide where to push the changes made, e.g. by 256 {{{ 257 git fetch upstream master 258 git checkout master 259 git merge BRANCHNAME 255 alternatively you may use 256 {{{ 257 curl -sLS https://github.com/macports/macports-ports/pull/<ID>.patch \ 258 | git am 259 }}} 260 then pull in changes from upstream, work on it (if required), commit and push to e.g. {{{upstream}}} (i.e. in case the work is ready for production): 261 {{{ 262 # --rebase option only needed if branch.autosetuprebase not set accordingly 263 git pull --rebase upstream master 264 265 # in case multiple commits have to be edited use 266 git rebase -i 267 268 # if missing append "Closes: #ID" to last commit message so that GitHub's PR gets auto-closed 269 git commit --amend 270 260 271 git push upstream master 261 272 }}} 262 263 273 264 274