Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for Using Github's CLI on Ubuntu & Commands.
c a
c a

Posted on • Edited on

     

Using Github's CLI on Ubuntu & Commands.

gh cli web

Working with GitHub has never been boring, as a matter of fact, it's the best part of the development process on my side. As usual, we use git and other distributed version control systems like Mercurial and many more.

I have been using the GitHub cli since February this year, and it is great. So let me show you how I got to use it. I'm on Ubuntu by the way. But I guess the process is the same on other OS, I'll check it out.

First, you download it onreleases. Select the file with an extension based on your OS. Currently, the latest version is 1.x.x.

After download, follow normal procedures of installing an app on your environment/OS. Once the file is installed, BOOM! You are ready to interact with the gh cli.

There are no many configuration settings needed. The commands can be used anywhere regardless of the Operating System. The commands are as shown below:

General Activity

Commandusagedetailed usage
gh --versionview version of gh cli-

Working with repositories (repo)

Commandusagedetailed usage
gh repo viewview current repo on the browser (web)https://cli.github.com/manual/gh_repo_view
gh repo forkcreate a fork of a repohttps://cli.github.com/manual/gh_repo_fork
gh repo createcreate a new repohttps://cli.github.com/manual/gh_repo_create
gh repo cloneclone a repo locallyhttps://cli.github.com/manual/gh_repo_clone

Working with Issues

Commandusagedetailed usage
gh issue viewview an issue of a repohttps://cli.github.com/manual/gh_issue_view
gh issue createcreate an issue locallyhttps://cli.github.com/manual/gh_issue_create
gh issue statusdisplays the status of issues on the repohttps://cli.github.com/manual/gh_issue_status
gh issue listlists all issues raised on the repohttps://cli.github.com/manual/gh_issue_list

Working with pull requests (pr)

Commandusagedetailed usage
gh pr viewview pull requests in browserhttps://cli.github.com/manual/gh_pr_view
gh pr statuslists the statuses of available pull requestshttps://cli.github.com/manual/gh_pr_status
gh pr listlists all pull requests in the current repohttps://cli.github.com/manual/gh_pr_list
gh pr createcreate a pull requesthttps://cli.github.com/manual/gh_pr_create
gh pr checkoutcheck out a pull request in githttps://cli.github.com/manual/gh_pr_checkout

References

  1. installation instructions
  2. gh cli manual

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Python(Django). JS. Software Eng
  • Location
    Kenya
  • Education
    Software Engineering
  • Work
    Software Eng Lead
  • Joined

More fromc a

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp