Skip to main content
ドキュメントには� �繁に更新が� えられ、その都度公開されています。本ページの翻訳はま� 未完成な部分があることをご了承く� さい。最新の情� �については、英語のドキュメンテーションをご参照く� さい。本ページの翻訳に問題がある� �合はこちらまでご連絡く� さい。

このバージョンの GitHub Enterprise はこの日付をもって終了となりました: 2022-06-03. 重大なセキュリティの問題に対してであっても、パッチリリースは作成されません。 パフォーマンスの向上、セキュリティの改善、新機能のためには、最新バージョンのGitHub Enterpriseにアップグレードしてく� さい。 アップグレードに関する支援については、GitHub Enterprise supportに連絡してく� さい。

GitHub CLI quickstart

Start using GitHub CLI to work with GitHub in the command line.

GitHub CLI について

GitHub CLI は、コンピューターのコマンドラインから GitHub を使用するためのオープンソースツールです。 コマンドラインから作業しているときは、GitHub CLI を使用して時間を節約し、コンテキストの切り替えを回避できます。

はじめましょう

  1. Install GitHub CLI on macOS, Windows, or Linux.

  2. In the command line, authenticate to GitHub.

    gh auth login

    To authenticate to GitHub Enterprise Serverインスタンス, use the --hostname flag.

    gh auth login --hostname hostname
  3. Start working with GitHub in the command line. For example, find an issue to work on with gh issue status or gh issue list --assignee @me. Create a pull request with gh pr create. Review a pull request with gh pr checkout, gh pr diff and gh pr review.

次のステップ

  • Tell GitHub CLI which text editor to use for commands that open a text editor. For example, enter gh config set editor "code -w" to set your preferred text editor to Visual Studio Code. For more information, see gh config set.

  • Define aliases for commands that you commonly run. For example, if you run gh alias set prd "pr create --draft", you will then be able to run gh prd to quickly open a draft pull request. For more information, see gh alias.

  • Create or add custom commands with GitHub CLI extensions. For more information, see "Using GitHub CLI extensions" and "Creating GitHub CLI extensions."

  • For more information about all of the commands that you can run with GitHub CLI, see "GitHub CLI reference."