|
NAMEgit-pr - Checks out a pull request locallySYNOPSISgit-pr [-m|--merge] <number> [<remote>]git-pr [-m|--merge] <[remote]:number>... git-pr [-m|--merge] <url>... git-pr clean DESCRIPTIONCreates a local branch based on a GitHub pull request number or URL, and switch to that branch afterwards.OPTIONS<remote>The name of the remote to fetch from. Defaults to origin. <url> GitHub pull request URL in the format https://github.com/tj/git-extras/pull/453. -m | --merge Checkout a merge commit against the branch the pull request is targeting. Because this feature uses a private API with which GitHub checks the pull request´s mergeability, it only works with the opened pull request. If the merge commit is not up-to-date, please visit the pull request web page to trigger the rebuild. EXAMPLESThis checks out the pull request 226 from origin:
This pulls from a different remote:
This does the same thing as the command above:
You can also checkout a pull request based on a GitHub URL:
You could even pull multiple pull requests via the GitHub URL or the ID with remote specified:
Note that git pr PR-A PR-B is equal to:
Therefore, if one of the pull request is failed to pull, this command will still go ahead and pull the others. The final exit code will be decided by the result of the final pulling. With --merge option, you could check out a merge commit:
To clean up old branches:
AUTHOROriginally from https://gist.github.com/gnarf/5406589REPORTING BUGS<https://github.com/tj/git-extras/issues>SEE ALSO<https://github.com/tj/git-extras>
Visit the GSP FreeBSD Man Page Interface. |