Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com> Co-authored-by: Grace Park <gracepark@github.com> Co-authored-by: Steve Guntrip <12534592+stevecat@users.noreply.github.com> Co-authored-by: Robert Sese <sese@github.com> Co-authored-by: Peter Bengtsson <peterbe@github.com> Co-authored-by: Rachael Sewell <rachmari@github.com>
2.3 KiB
title, intro, versions, topics, type, allowTitleToDifferFromFilename, shortTitle
| title | intro | versions | topics | type | allowTitleToDifferFromFilename | shortTitle | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| GitHub CLI quickstart | Start using {% data variables.product.prodname_cli %} to work with {% data variables.product.company_short %} in the command line. |
|
|
overview | true | Quickstart |
About {% data variables.product.prodname_cli %}
{% data reusables.cli.about-cli %}
Getting started
- Install {% data variables.product.prodname_cli %} on macOS, Windows, or Linux.
- In the command line, authenticate to {% data variables.product.company_short %}.
gh auth login
{% ifversion not fpt or ghec %}
To authenticate to {% data variables.product.product_location %}, use the --hostname flag.
gh auth login --hostname <em>hostname</em>
{% endif %}
- Start working with {% data variables.product.company_short %} in the command line. For example, find an issue to work on with
gh issue statusorgh issue list --assignee @me. Create a pull request withgh pr create. Review a pull request withgh pr checkout,gh pr diffandgh pr review.
Next steps
-
Tell {% data variables.product.prodname_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 {% data variables.product.prodname_vscode %}. For more information, seegh 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 rungh prdto quickly open a draft pull request. For more information, seegh alias. -
Create or add custom commands with {% data variables.product.prodname_cli %} extensions. For more information, see "Using {% data variables.product.prodname_cli %} extensions" and "Creating {% data variables.product.prodname_cli %} extensions."
-
For more information about all of the commands that you can run with {% data variables.product.prodname_cli %}, see "{% data variables.product.prodname_cli %} reference."