Using GitHub CLI v1.0

mariamiah profile image Maria Nanfuka ・1 min read

Github CLI v1.0 has been released and is available for download on Linux, MacOS, Windows machines

With Github CLI v1.0, you are able to:

  • run entire github workflow from the terminal
  • set a custom alias for any command
  • connect to github enterprise server 2.20+


brew install gh
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0
sudo apt-add-repository https://cli.github.com/packages
sudo apt update
sudo apt install gh
  • via scoop
scoop bucket add github-gh https://github.com/cli/scoop-gh.git
scoop install gh
  • via chocolatey
choco install gh    

Managing Github repository using github cli

  • Initialize private repository
gh repo create <name>
  • Initialize a public repository
gh repo create <name> --public
  • Clone remote repository
gh repo clone <repository-url>
  • Fork repository
gh repo fork

Managing Pull requests using github cli

  • Create pull request
gh pr create
  • Checkout pull request
gh pr checkout {<pull request number> | <url> | <branch>} [flags]
  • View the Diff
gh pr diff
  • Check all tests are passing
gh pr checks
  • Merge pull request
gh pr merge

Manage Aliases with github cli

  • Create aliases
gh alias set
  • Share your aliases with a gist
gh alias list | gh gist create

Manage Issues with github cli

  • Create a new issue
gh issue create
  • List issue
gh issue list
gh issue list --state closed
  • View status of issue
gh issue status


Posted on by:

mariamiah profile

Maria Nanfuka


DevOps | Python | Javascript


Editor guide