2025-03-14 21:59:59 -06:00
|
|
|
# gh
|
|
|
|
|
|
|
|
|
|
> Work seamlessly with GitHub.
|
|
|
|
|
> Some subcommands such as `config` have their own usage documentation.
|
2025-05-08 12:26:01 -06:00
|
|
|
> More information: <https://cli.github.com/manual/gh>.
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Clone a GitHub repository locally:
|
|
|
|
|
|
|
|
|
|
`gh repo clone {{owner}}/{{repository}}`
|
|
|
|
|
|
|
|
|
|
- Create a new issue:
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`gh issue {{[new|create]}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- View and filter the open issues of the current repository:
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`gh issue {{[ls|list]}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- View an issue in the default web browser:
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`gh issue view {{[-w|--web]}} {{issue_number|url}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Create a pull request:
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`gh pr {{[new|create]}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- View a pull request in the default web browser:
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`gh pr view {{[-w|--web]}} {{pr_number|url|branch}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Check out a specific pull request locally:
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`gh {{[co|pr checkout]}} {{pr_number|url|branch}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Check the status of a repository's pull requests:
|
|
|
|
|
|
|
|
|
|
`gh pr status`
|