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 65
65
* [ Get the name of current branch.] ( https://github.com/git-tips/tips#get-the-name-of-current-branch )
66
66
* [ Ignore one file on commit (e.g. Changelog).] ( https://github.com/git-tips/tips#ignore-one-file-on-commit-eg-changelog )
67
67
* [ 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 )
68
69
69
70
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
70
71
<!-- @doxie.inject end toc -->
@@ -455,5 +456,16 @@ git update-index --assume-unchanged Changelog; git commit -a; git update-index -
455
456
git rebase --autostash
456
457
```
457
458
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
+
458
470
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
459
471
<!-- @doxie.inject end -->
Original file line number Diff line number Diff line change 259
259
{
260
260
"title" : " Stash changes before rebasing" ,
261
261
"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>" ]
262
267
}
263
268
]
You can’t perform that action at this time.
0 commit comments