使えそうな hub コマンド

インストール

$ brew install hub

alias 設定*1

git hoge と打つと hub hoge と同じに動作になる設定です

eval "$(hub alias -s)"

http://shoma2da.hatenablog.com/entry/2014/03/26/222802

詳細

browse

今作業しているブランチの github ページをブラウザで開きます

hub browse

pull-request

コマンドからプルリクエストを作成できます
-b オプションを付けないととんでもないところに投げてしまい Github のプルリクエストが荒れるので注意しましょう*2.
-o をつけるとプルリクエストのページを開いてくれるので便利です.
-i は対象の issue 番号を指定すると新たに issue を生成せずに issue を再利用してプルリクエストをします.

hub pull-request -b develop -i 123

http://d.hatena.ne.jp/hokaccha/20130829/1377769612

git pull-request [-o|--browse] [-f] [-m MESSAGE|-F FILE|-i ISSUE|ISSUE-URL]
[-b BASE] [-h HEAD]
Opens a pull request on GitHub for the project that the "origin"
remote points to. The default head of the pull request is the current
branch. Both base and head of the pull request can be explicitly
given in one of the following formats: "branch", "owner:branch",
"owner/repo:branch". This command will abort operation if it detects
that the current topic branch has local commits that are not yet
pushed to its upstream branch on the remote. To skip this check, use
-f.

Without MESSAGE or FILE, a text editor will open in which title and
body of the pull request can be entered in the same manner as git
commit message. Pull request message can also be passed via stdin
with -F -.

With -o or --browse, the new pull request will open in the web
browser.

Issue to pull request conversion via -i or ISSUE-URL argu-
ments is deprecated and will likely be removed from the future ver-
sions of both hub and GitHub API.

ci-status

CI の結果のステータスを出力する
いちいちプルリクエストのページを開かずに CI の結果を表示できる

git ci-status [-v] [COMMIT]
Looks up the SHA for COMMIT in GitHub Status API and displays the latest status. Exits with one of:
success (0), error (1), failure (1), pending (2), no status (3)

If -v is given, additionally print the URL to CI build results.

*1:GitHubを使ってるならhubコマンドを使うべし - shoma2da's diary

*2:プルリクエスト本当にいらないものを削除できるようにしてほしい. もしくは間違いが起こらない管理方法かUIを設計してほしい.