Skip to content

GitHub CLI

kavinda keshara edited this page Aug 4, 2021 · 1 revision

GitHub CLI Basics

1. Clone a Repo

gh repo --help

To clone a repository from GitHub, you can use the following command.

gh repo clone owner/repo

2. Create Issue

gh issue create

Also, you can list issues with the command shown below.

gh issue list

3. Create and Merge Pull Request

gh pr create

merge the changes into the branch

gh pr merge

Extending GitHub CLI

1. Create Custom commands

gh alias set

2.Make Custom API Queries

gh api <endpoint> [flags]