File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 6565* [ Get the name of current branch.] ( https://github.com/git-tips/tips#get-the-name-of-current-branch )
6666* [ Ignore one file on commit (e.g. Changelog).] ( https://github.com/git-tips/tips#ignore-one-file-on-commit-eg-changelog )
6767* [ Stash changes before rebasing] ( https://github.com/git-tips/tips#stash-changes-before-rebasing )
68+ * [ Fetch pull request by ID to a local branch] ( https://github.com/git-tips/tips#fetch-pull-request-by-id-to-a-local-branch )
6869
6970<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
7071<!-- @doxie.inject end toc -->
@@ -455,5 +456,16 @@ git update-index --assume-unchanged Changelog; git commit -a; git update-index -
455456git rebase --autostash
456457```
457458
459+ ## Fetch pull request by ID to a local branch
460+ ``` sh
461+ git fetch origin pull/< id> /head:< branch-name>
462+ ```
463+
464+
465+ __ Alternatives:__
466+ ``` sh
467+ git pull origin pull/< id> /head:< branch-name>
468+ ```
469+
458470<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
459471<!-- @doxie.inject end -->
Original file line number Diff line number Diff line change 259259 {
260260 "title" : " Stash changes before rebasing" ,
261261 "tip" : " git rebase --autostash"
262+ },
263+ {
264+ "title" : " Fetch pull request by ID to a local branch" ,
265+ "tip" : " git fetch origin pull/<id>/head:<branch-name>" ,
266+ "alternatives" : [" git pull origin pull/<id>/head:<branch-name>" ]
262267 }
263268]
You can’t perform that action at this time.
0 commit comments