LoginSignup
5
3

More than 5 years have passed since last update.

hub で GitHub にターミナルから issue、PR を作成する

Posted at

hub のインストール

brew でもインストールできるが pre-release ではなく issue や pull-request の一部のオプションが使えないので以下 URL から最新版をインストール。

Issue を作成

# -a assignee
# -M milestone (ID)
# -m message
# -l label
$ hub issue create \
    -a "github_account" \
    -M 83 \
    -m "This is new issue" \
    -l "My Feature","WIP"

Pull Request を作成

# -b branch name
# -m message
$ hub pull-request \
    -m "This is new Pull-Request" \
    -b feature/new_function

ヘルプ

$ hub issue --help  

Usage: hub issue [-a <ASSIGNEE>] [-c <CREATOR>] [-@ <USER] [-s <STATE>] [-f <FORMAT>] [-M <MILESTONE>] [-l <LABELS>] [-d <DATE>] [-o <SORT_KEY> [-^]]
       hub issue create [-oc] [-m <MESSAGE>|-F <FILE>] [-a <USERS>] [-M <MILESTONE>] [-l <LABELS>]

$ hub pull-request --help

Usage: hub pull-request [-foc] [-b <BASE>] [-h <HEAD>] [-a <USERS>] [-M <MILESTONE>] [-l <LABELS>]
       hub pull-request -m <MESSAGE>
       hub pull-request -F <FILE> [--edit]
       hub pull-request -i <ISSUE>
5
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
5
3