Skip to main content
Ganesh Joshi
Back to Cheatsheets

GitHub CLI (gh)

Updated 2026-02-15

gh for repos, pull requests, issues, and workflows. Create PRs and manage GitHub from the terminal.

Repos and auth

  • gh auth login

    Log in to GitHub.

  • gh repo clone owner/repo

    Clone repo.

  • gh repo create

    Create repo (interactive).

  • gh repo view

    View repo in browser.

PRs and issues

  • gh pr create

    Create PR from current branch.

  • gh pr list

    List PRs.

  • gh pr checkout 123

    Checkout PR branch.

  • gh issue list

    List issues.

  • gh issue create

    Create issue.

GitHub CLI (gh) | Cheatsheet | Ganesh Joshi