1
0
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:
hemanth.hm 2015-10-29 12:04:05 +05:30
commit 6ac9a177bd
2 changed files with 17 additions and 0 deletions

View File

@ -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)
<!-- Dont 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>
```
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end -->

View File

@ -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>"]
}
]