Linux, terminal and Git

Stage 6 · Lesson 7 of 8

The GitHub CLI

GitHub and working with others

The , called gh, lets you use GitHub from your terminal. gh auth login connects your account. gh repo clone owner/name a .

gh pr create opens a from your branch. gh pr checkout 42 downloads someone's pull request number 42 so you can try it. gh pr status shows the state of your pull requests and reviews, and gh run list shows recent automated test runs (CI).

It saves many trips to the browser and works well in scripts. Install it from your or the official site.

Common trapusing it as a way to skip reading the pull request on GitHub; the CLI is for speed, not for skipping review.

A question to check yourself, an AI practice session and 1 cheat sheet entry come when you add the roadmap to your account. Add it

Resources for this stage

Start with· follow one of these

  • BookFree
    Pro Git

    Scott Chacon and Ben Straub

    Chapter 6 covers GitHub itself: forks, pull requests and maintaining a project

  • GuideFree
    Contributing to a Project (GitHub Docs)

    GitHub · Beginner

    GitHub's own walkthrough of the fork, branch and pull request workflow

Practise

  • A safe repository built for making your first pull request to someone else's project

Keep handy

Also worth your time

Mark this stage as not done?