#Autenticação
| Comando | Descrição | |
|---|---|---|
gh auth login | Fazer login no GitHub | |
gh auth logout | Fazer logout | |
gh auth status | Verificar status de autenticação | |
gh auth refresh | Atualizar token de autenticação | |
gh auth switch | Trocar conta |
#Repositório
| Comando | Descrição | |
|---|---|---|
gh repo create [name] | Criar novo repositório | |
gh repo clone [repo] | Clonar repositório | |
gh repo fork [repo] | Fazer fork do repositório | |
gh repo view | Ver informações do repositório | |
gh repo view --web | Abrir no navegador | |
gh repo list [user] | Listar repositórios | |
gh repo delete [repo] | Excluir repositório | |
gh repo rename [new-name] | Renomear repositório |
#Issues
| Comando | Descrição | |
|---|---|---|
gh issue list | Listar issues | |
gh issue create | Criar issue (interativo) | |
gh issue create -t "[title]" -b "[body]" | Criar issue (inline) | |
gh issue view [number] | Ver detalhes do issue | |
gh issue close [number] | Fechar issue | |
gh issue reopen [number] | Reabrir issue | |
gh issue edit [number] | Editar issue | |
gh issue comment [number] -b "[body]" | Adicionar comentário ao issue |
#Pull Request
| Comando | Descrição | |
|---|---|---|
gh pr list | Listar PRs | |
gh pr create | Criar PR (interativo) | |
gh pr create -t "[title]" -b "[body]" | Criar PR (inline) | |
gh pr view [number] | Ver detalhes do PR | |
gh pr checkout [number] | Checkout do branch do PR | |
gh pr merge [number] | Mesclar PR | |
gh pr merge --squash | Squash e mesclar | |
gh pr merge --rebase | Rebase e mesclar | |
gh pr close [number] | Fechar PR | |
gh pr review [number] | Revisar PR | |
gh pr diff [number] | Ver diff do PR |
#GitHub Actions
| Comando | Descrição | |
|---|---|---|
gh run list | Listar execuções de workflow | |
gh run view [run-id] | Ver detalhes da execução | |
gh run watch [run-id] | Assistir progresso da execução | |
gh run rerun [run-id] | Reexecutar workflow | |
gh run cancel [run-id] | Cancelar execução | |
gh run download [run-id] | Baixar artefatos | |
gh workflow list | Listar workflows | |
gh workflow run [workflow] | Executar workflow manualmente | |
gh workflow enable [workflow] | Habilitar workflow | |
gh workflow disable [workflow] | Desabilitar workflow |
#Releases
| Comando | Descrição | |
|---|---|---|
gh release list | Listar releases | |
gh release create [tag] | Criar release | |
gh release create [tag] --generate-notes | Gerar notas automaticamente | |
gh release view [tag] | Ver detalhes do release | |
gh release download [tag] | Baixar assets do release | |
gh release upload [tag] [files] | Enviar assets | |
gh release delete [tag] | Excluir release |
#Gist
| Comando | Descrição | |
|---|---|---|
gh gist list | Listar gists | |
gh gist create [file] | Criar gist | |
gh gist create --public [file] | Criar gist público | |
gh gist view [id] | Ver gist | |
gh gist edit [id] | Editar gist | |
gh gist clone [id] | Clonar gist | |
gh gist delete [id] | Excluir gist |
#Pesquisa
| Comando | Descrição | |
|---|---|---|
gh search repos [query] | Pesquisar repositórios | |
gh search issues [query] | Pesquisar issues | |
gh search prs [query] | Pesquisar PRs | |
gh search code [query] | Pesquisar código | |
gh search commits [query] | Pesquisar commits |
#API e outros
| Comando | Descrição | |
|---|---|---|
gh api [endpoint] | Chamar API do GitHub | |
gh api graphql -f query="..." | Consulta GraphQL | |
gh browse | Abrir repo atual no navegador | |
gh browse [file] | Abrir arquivo no navegador | |
gh alias set [alias] "[command]" | Definir alias de comando | |
gh extension list | Listar extensões | |
gh extension install [repo] | Instalar extensão |
#Perguntas frequentes (FAQ)
이 포스팅은 쿠팡 파트너스 활동의 일환으로, 이에 따른 일정액의 수수료를 제공받습니다.