Github CLI Cheat Sheet

Take GitHub to the command line. Unlock the full potential of GitHub with our comprehensive GitHub cheat sheet.

General

Command Description
gh repo create Create a new GitHub repository.
gh repo view owner/repo View information about a repository.
gh repo clone owner/repo Clone a repository to your local machine.
gh issue create Create a new GitHub issue.
gh issue list List all issues in the current repository.
gh pr create Create a new pull request.
gh pr list List all pull requests in the repository.
gh pr checkout pr_number Check out a pull request locally.
gh pr merge pr_number Merge a pull request.
gh pr status View the status of the current pull request.
gh workflow run workflow_name Trigger a GitHub Actions workflow.
gh repo fork upstream_repo Fork a repository on GitHub.
gh repo sync Fetch updates from the upstream repository.
gh repo create --public Create a public repository.
gh repo delete owner/repo Delete a repository on GitHub.
gh issue status Display the status of issues.
gh auth login Log in to your GitHub account.
gh auth logout Log out from the current GitHub account.
gh help Display help information about GitHub CLI commands.