2020-02-17 03:30:39 +01:00
|
|
|
# gh
|
|
|
|
|
|
|
|
> Work seamlessly with GitHub from the command line.
|
|
|
|
> More information: <https://cli.github.com/>.
|
|
|
|
|
2020-10-24 15:46:22 +02:00
|
|
|
- Clone a repository locally:
|
2020-02-17 03:30:39 +01:00
|
|
|
|
2020-10-24 15:46:22 +02:00
|
|
|
`gh repo clone {{owner}}/{{repository}}`
|
2020-02-17 03:30:39 +01:00
|
|
|
|
2020-10-24 15:46:22 +02:00
|
|
|
- Create a new issue:
|
2020-02-17 03:30:39 +01:00
|
|
|
|
2020-10-24 15:46:22 +02:00
|
|
|
`gh issue create`
|
2020-02-17 03:30:39 +01:00
|
|
|
|
2020-10-24 15:46:22 +02:00
|
|
|
- View and filter a repository’s open issues:
|
2020-02-17 03:30:39 +01:00
|
|
|
|
2020-10-24 15:46:22 +02:00
|
|
|
`gh issue list`
|
2020-02-17 03:30:39 +01:00
|
|
|
|
2020-10-24 15:46:22 +02:00
|
|
|
- View an issue in the browser:
|
2020-02-17 03:30:39 +01:00
|
|
|
|
2020-10-24 15:46:22 +02:00
|
|
|
`gh issue view --web {{issue_number}}`
|
2020-02-17 03:30:39 +01:00
|
|
|
|
2020-10-24 15:46:22 +02:00
|
|
|
- Create a pull request:
|
2020-10-13 18:37:01 +08:00
|
|
|
|
2020-10-24 15:46:22 +02:00
|
|
|
`gh pr create`
|
2020-10-13 18:37:01 +08:00
|
|
|
|
2020-10-24 15:46:22 +02:00
|
|
|
- View a pull request in the browser:
|
2020-02-17 03:30:39 +01:00
|
|
|
|
2020-10-24 15:46:22 +02:00
|
|
|
`gh pr view --web {{pr_number}}`
|
2020-02-17 03:30:39 +01:00
|
|
|
|
2020-10-24 15:46:22 +02:00
|
|
|
- Check out pull requests locally:
|
2020-02-17 03:30:39 +01:00
|
|
|
|
2020-10-24 15:46:22 +02:00
|
|
|
`gh pr checkout {{pr_number}}`
|
2020-02-17 03:30:39 +01:00
|
|
|
|
2020-10-24 15:46:22 +02:00
|
|
|
- Check the status of a repository's pull requests:
|
2020-02-17 03:30:39 +01:00
|
|
|
|
2020-10-24 15:46:22 +02:00
|
|
|
`gh pr status`
|