mirror of
https://github.com/tj/git-extras.git
synced 2026-09-12 08:26:17 -04:00
Although Github reserves the 'visionmedia' user space(a visit to there will be redirected to 'tj'), it's better to rename the links from visionmedia/git-extras to tj/git-extras
57 lines
1.1 KiB
Markdown
57 lines
1.1 KiB
Markdown
git-pr(1) -- Checks out a pull request locally
|
|
=================================
|
|
|
|
## SYNOPSIS
|
|
|
|
`git-pr` <number> [<remote>]<br>
|
|
`git-pr clean`
|
|
|
|
## DESCRIPTION
|
|
|
|
Creates a local branch based on a GitHub pull request number, and switch to
|
|
that branch afterwards.
|
|
|
|
## OPTIONS
|
|
|
|
<remote>
|
|
|
|
The name of the remote to fetch from. Defaults to `origin`.
|
|
|
|
## EXAMPLES
|
|
|
|
This checks out the pull request `226` from `origin`:
|
|
|
|
$ git pr 226
|
|
|
|
remote: Counting objects: 12, done.
|
|
remote: Compressing objects: 100% (9/9), done.
|
|
remote: Total 12 (delta 3), reused 9 (delta 3)
|
|
Unpacking objects: 100% (12/12), done.
|
|
From https://github.com/tj/git-extras
|
|
* [new ref] refs/pull/226/head -> pr/226
|
|
|
|
Switched to branch 'pr/226'
|
|
|
|
This pulls from a different remote:
|
|
|
|
$ git pr 226 upstream
|
|
|
|
To clean up old branches:
|
|
|
|
$ git pr clean
|
|
|
|
Deleted branch pr/226 (was b96a8c2).
|
|
Deleted branch pr/220 (was d34dc0f).
|
|
|
|
## AUTHOR
|
|
|
|
Originally from https://gist.github.com/gnarf/5406589
|
|
|
|
## REPORTING BUGS
|
|
|
|
<<https://github.com/tj/git-extras/issues>>
|
|
|
|
## SEE ALSO
|
|
|
|
<<https://github.com/tj/git-extras>>
|