8000 gh-861: Document GitHub CLI (#882) · python/devguide@d88bf3a · GitHub
[go: up one dir, main page]

Skip to content

Commit d88bf3a

Browse files
zahugovk
andauthored
gh-861: Document GitHub CLI (#882)
* gh-861 Initial commit to document GitHub CLI on gitbootcamp.rst * gh-861 Address feedback * Numbered list * ssh formatting * code block removal Reference: #882 (review) * gh-861 Add <pr-id> * gh-861 Add short description and installation instruction. * gh-861 Reformat the hyperlink * gh-861 Make `gh auth login` in a separate section and fix the broken link. * gh-861 Address feedback from @hugovk #882 (review) * gh-861 Make the period not as part of the hyperlink. * gh-8161 Change to lowercase Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> * gh-861 No need to repeat CLI Feedback by @hugovk #882 (comment) * gh-861 Simplified introduction paragraph Feedback by @ezio-melotti #882 (comment) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
1 parent 9d69d02 commit d88bf3a

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

gitbootcamp.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,3 +536,35 @@ To edit an open pull request that targets ``main``:
536536
git push git@github.com:<contributor>/cpython <pr_number>:<branch_name>
537537

538538
5. Optionally, :ref:`delete the PR branch <deleting_branches>`.
539+
540+
541+
GitHub CLI
542+
----------
543+
544+
`GitHub CLI <https://cli.github.com>`_ is a command-line
545+
interface that allows you to create, update, and check GitHub
546+
issues and pull requests.
547+
548+
You can install GitHub CLI `by following these instructions
549+
<https://github.com/cli/cli#installation>`_. After installing,
550+
you need to authenticate::
551+
552+
gh auth login
553+
554+
Examples of useful commands:
555+
556+
* Create a PR::
557+
558+
gh pr create
559+
560+
* Check out another PR::
561+
562+
gh pr checkout <pr-id>
563+
564+
* Set ``ssh`` as the Git protocol::
565+
566+
gh config set git_protocol ssh
567+
568+
* Set the browser::
569+
570+
gh config set browser <browser-path>

0 commit comments

Comments
 (0)
0