`pr fetch` command
- Dominant language
- Go
- Stars
- 46.3k
- Forks
- 9k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 89
Description
### Fetching pull requests without checking them out
Usually I work with development branches and merge pull requests directly to them for testing. Most of the time, it is not necessary to actually check out the branch into a work tree, I can just merge it directly. However the GitHub CLI tool always checks out the branch.
### Proposed solution
[It is possible][1] to do this manually:
```shell
git fetch origin pull/PR-NUMBER/head:BRANCH-NAME
```
It is very annoying though since I need to look up the user and branch name and name the branch myself. It would be far more convenient to be able to run something like:
```shell
gh pr fetch PR-NUMBER
```
To simply fetch the `PR-NUMBER` pull request into a local branch in the `-` format.
[1]: https://stackoverflow.com/a/30584951
Contributor guide
Assessment
This issue has not been assessed yet.