gh flags & options
gh auth login
Authenticate with GitHub.
gh auth login
gh auth login --with-token < token.txt
gh repo clone
Clone a repository.
gh repo clone owner/repo
gh repo create
Create a new repository.
gh repo create my-project --public
gh repo create my-project --private --clone
gh pr create
Create a pull request.
gh pr create --title "Fix bug" --body "Description here"
gh pr create --fill
gh pr list
List open pull requests.
gh pr list
gh pr list --state closed --limit 10
gh pr checkout
Check out a pull request locally.
gh pr checkout 123
gh pr merge
Merge a pull request.
gh pr merge 123 --squash
gh pr merge 123 --rebase --delete-branch
gh issue create
Create an issue.
gh issue create --title "Bug report" --body "Details"
gh issue list
List open issues.
gh issue list
gh issue list --label bug --assignee @me
gh run list
List recent workflow runs.
gh run list
gh run view
View details of a workflow run.
gh run view 12345
gh run view 12345 --log
gh release create
Create a release.
gh release create v1.0.0 --generate-notes
gh release create v1.0.0 ./dist/*.tar.gz
gh api
Make authenticated API requests.
gh api repos/owner/repo/issues
gh api -X POST repos/owner/repo/issues -f title="Bug" -f body="Details"
gh browse
Open the repository in the browser.
gh browse
gh browse --issues