#Authentication
| Command | Description | |
|---|---|---|
gh auth login | Login to GitHub | |
gh auth logout | Logout | |
gh auth status | Check auth status | |
gh auth refresh | Refresh auth token | |
gh auth switch | Switch account |
#Repository
| Command | Description | |
|---|---|---|
gh repo create [name] | Create new repository | |
gh repo clone [repo] | Clone repository | |
gh repo fork [repo] | Fork repository | |
gh repo view | View repository info | |
gh repo view --web | Open in browser | |
gh repo list [user] | List repositories | |
gh repo delete [repo] | Delete repository | |
gh repo rename [new-name] | Rename repository |
#Issues
| Command | Description | |
|---|---|---|
gh issue list | List issues | |
gh issue create | Create issue (interactive) | |
gh issue create -t "[title]" -b "[body]" | Create issue (inline) | |
gh issue view [number] | View issue details | |
gh issue close [number] | Close issue | |
gh issue reopen [number] | Reopen issue | |
gh issue edit [number] | Edit issue | |
gh issue comment [number] -b "[body]" | Add comment to issue |
#Pull Request
| Command | Description | |
|---|---|---|
gh pr list | List PRs | |
gh pr create | Create PR (interactive) | |
gh pr create -t "[title]" -b "[body]" | Create PR (inline) | |
gh pr view [number] | View PR details | |
gh pr checkout [number] | Checkout PR branch | |
gh pr merge [number] | Merge PR | |
gh pr merge --squash | Squash and merge | |
gh pr merge --rebase | Rebase and merge | |
gh pr close [number] | Close PR | |
gh pr review [number] | Review PR | |
gh pr diff [number] | View PR diff |
#GitHub Actions
| Command | Description | |
|---|---|---|
gh run list | List workflow runs | |
gh run view [run-id] | View run details | |
gh run watch [run-id] | Watch run progress | |
gh run rerun [run-id] | Rerun workflow | |
gh run cancel [run-id] | Cancel run | |
gh run download [run-id] | Download artifacts | |
gh workflow list | List workflows | |
gh workflow run [workflow] | Manually run workflow | |
gh workflow enable [workflow] | Enable workflow | |
gh workflow disable [workflow] | Disable workflow |
#Releases
| Command | Description | |
|---|---|---|
gh release list | List releases | |
gh release create [tag] | Create release | |
gh release create [tag] --generate-notes | Auto-generate release notes | |
gh release view [tag] | View release details | |
gh release download [tag] | Download release assets | |
gh release upload [tag] [files] | Upload assets | |
gh release delete [tag] | Delete release |
#Gist
| Command | Description | |
|---|---|---|
gh gist list | List gists | |
gh gist create [file] | Create gist | |
gh gist create --public [file] | Create public gist | |
gh gist view [id] | View gist | |
gh gist edit [id] | Edit gist | |
gh gist clone [id] | Clone gist | |
gh gist delete [id] | Delete gist |
#Search
| Command | Description | |
|---|---|---|
gh search repos [query] | Search repositories | |
gh search issues [query] | Search issues | |
gh search prs [query] | Search PRs | |
gh search code [query] | Search code | |
gh search commits [query] | Search commits |
#API & Others
| Command | Description | |
|---|---|---|
gh api [endpoint] | Call GitHub API | |
gh api graphql -f query="..." | GraphQL query | |
gh browse | Open current repo in browser | |
gh browse [file] | Open file in browser | |
gh alias set [alias] "[command]" | Set command alias | |
gh extension list | List extensions | |
gh extension install [repo] | Install extension |
#Frequently Asked Questions
이 포스팅은 쿠팡 파트너스 활동의 일환으로, 이에 따른 일정액의 수수료를 제공받습니다.