LoginSignup
2
3

More than 3 years have passed since last update.

GitHubをCLIで操作出来るghコマンド地味に便利

Posted at

はじめに

CLIでGitHubを操作出来るghコマンドが地味に便利なので簡単に使い方を紹介します。
レポジトリは以下。
https://github.com/cli/cli

導入

インストール
brew install github/gh/gh

コマンド

pull request

作成する
gh pr create

ドラフトで作成する
gh pr create -d

マージしたいブランチを指定
gh pr create -B <ブランチ名>

作成画面をブラウザで開く
gh pr create -w

ステータスごと(Current branch、Created by you、Requesting a code review from you)に表示
gh pr status

issue

作成
gh issue create

作成画面をブラウザで開く
gh issue create -w

ステータスごと(Issues assigned to you、Issues mentioning you、Issues opened by you)にissueを表示
gh issue status

最後に

他にも出来ることはあるので、興味がある方は是非マニュアルを見てみて下さい!
https://cli.github.com/manual/

2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3