commands
// 2026-01-05
// ID: REF-Gh Command List
Gh Command List
GitHub CLI Command Guide
gh is GitHub on the command line.
Top 10 Useful Commands
1. Login
gh auth login
Explanation: Authenticate via web or token.
2. Clone
gh repo clone owner/repo
Explanation: Clone without needing full URL.
3. Create Repo
gh repo create my-project --public
Explanation: Create a new repo on GitHub.
4. Create Issue
gh issue create --title "Bug" --body "Details"
Explanation: File an issue.
5. Create PR
gh pr create
Explanation: Create a Pull Request from current branch.
6. Check PRs
gh pr list
Explanation: See open PRs.
7. View Gist
gh gist view <id>
Explanation: Read a gist.
8. Create Gist
gh gist create secret.txt
Explanation: Shared snippet.
9. Repo View
gh repo view
Explanation: Open standard browser to repo.
10. Check Status
gh status
Explanation: See notifications/PRs.
The Most Powerful Command
gh repo fork owner/repo --clone
Explanation: Fork a repo and clone it to your machine in one step.