8000 gh-861: Document GitHub CLI by za · Pull Request #882 · python/devguide · GitHub
[go: up one dir, main page]

Skip to content

gh-861: Document GitHub CLI #882

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jul 1, 2022
32 changes: 32 additions & 0 deletions gitbootcamp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -551,3 +551,35 @@ To edit an open pull request that targets ``main``:
git push git@github.com:<contributor>/cpython <pr_number>:<branch_name>

5. Optionally, :ref:`delete the PR branch <deleting_branches>`.


GitHub CLI
----------

GitHub CLI is a CLI (command-line interface) to work with GitHub.
For example, you can create pull requests and releases,
set alias commands, check PR statuses.

You can install GitHub CLI `by following these instructions
<https://github.com/cli/cli#installation>`_. After installing,
you need to authenticate::

gh auth login

Examples of useful commands:

* Create a PR::

gh pr create

* Check out another PR::

gh pr checkout <pr-id>

* Set ``ssh`` as the Git protocol::

gh config set git_protocol ssh

* Set the browser::

gh config set browser <browser-path>
0