mirror of
https://github.com/namibia/tips.git
synced 2024-12-23 02:28:58 +00:00
Merge pull request #38 from samarpanda/modify_pr_locally
Fetch PR by ID to a local branch!
This commit is contained in:
commit
6ac9a177bd
12
README.md
12
README.md
@ -65,6 +65,7 @@
|
||||
* [Get the name of current branch.](https://github.com/git-tips/tips#get-the-name-of-current-branch)
|
||||
* [Ignore one file on commit (e.g. Changelog).](https://github.com/git-tips/tips#ignore-one-file-on-commit-eg-changelog)
|
||||
* [Stash changes before rebasing](https://github.com/git-tips/tips#stash-changes-before-rebasing)
|
||||
* [Fetch pull request by ID to a local branch](https://github.com/git-tips/tips#fetch-pull-request-by-id-to-a-local-branch)
|
||||
|
||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||
<!-- @doxie.inject end toc -->
|
||||
@ -455,5 +456,16 @@ git update-index --assume-unchanged Changelog; git commit -a; git update-index -
|
||||
git rebase --autostash
|
||||
```
|
||||
|
||||
## Fetch pull request by ID to a local branch
|
||||
```sh
|
||||
git fetch origin pull/<id>/head:<branch-name>
|
||||
```
|
||||
|
||||
|
||||
__Alternatives:__
|
||||
```sh
|
||||
git pull origin pull/<id>/head:<branch-name>
|
||||
```
|
||||
|
||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||
<!-- @doxie.inject end -->
|
||||
|
@ -259,5 +259,10 @@
|
||||
{
|
||||
"title": "Stash changes before rebasing",
|
||||
"tip": "git rebase --autostash"
|
||||
},
|
||||
{
|
||||
"title": "Fetch pull request by ID to a local branch",
|
||||
"tip": "git fetch origin pull/<id>/head:<branch-name>",
|
||||
"alternatives": ["git pull origin pull/<id>/head:<branch-name>"]
|
||||
}
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user