LoginSignup
42
43

More than 5 years have passed since last update.

hub コマンドチートシート

Posted at

hub コマンドとは

  • git コマンドをラップして GitHub をより使いやすくするコマンドラインツール

インストール方法 (Mac)

$ brew install hub

便利な hub コマンド一覧

  • 個人的には、作成済みの issue を pull request にするのに一番良く使うが、他にも便利コマンドがある
# issue を pull-request にする
$ hub pull-request [branch name] -i [isuue id]

# CI の結果を表示
$ hub ci-status

# 今いるレポジトリをブラウザで開く
$ hub browse

# クローン
$ hub clone [user]/[repo]

# 現在のトピックブランチと master との差分を表示する Github ページを開く
$ hub compare

# ヘルプ
$ hub help

エイリアス設定

  • 使っているシェルの設定ファイル(.bash_profile)に以下を追加すると、上記コマンドで hub としていたところを git として使える
.bash_profile
eval "$(hub alias -s)"

参考

42
43
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
42
43