Back to Cheat Sheets
GitHub CLI Commands
Commands for managing GitHub repositories from the command line.
| Action | Command | Details |
|---|---|---|
| Authenticate | gh auth login |
Login to your GitHub account. |
| Clone repo | gh repo clone owner/repo |
Clone a repository from GitHub. |
| Create repo | gh repo create repo-name |
Create a new repository on GitHub. |
| View repo | gh repo view |
Show repository details. |
| Create issue | gh issue create |
Create a new GitHub issue. |
| List issues | gh issue list |
List open issues in the repo. |
| View pull requests | gh pr list |
List open pull requests. |
| Create pull request | gh pr create |
Open a new pull request. |
| Merge pull request | gh pr merge <pr-number> |
Merge a pull request. |
| View workflows | gh workflow list |
List GitHub Actions workflows. |
| Run workflow | gh workflow run <workflow.yml> |
Trigger a GitHub Actions workflow. |
| View notifications | gh notification |
List GitHub notifications. |