ターミナルとキーボードだけでプルリクエストを送る
·1 分で読めます
これはSending pull-request only with terminal and keyboardの日本語の記事です。
必要なもの
- Mac
- Terminal
- hub command (
brew install hubでインストールしておく)
How to send pull-request
ブランチを作る
$ git checkout -b new-cool-featureソースを編集する
$ git commit -aわざとgit pushしてエラーにして、正しいコマンドをpbcopyでクリップボードにコピー
$ git push 2>&1 | grep git | pbcopyCmd+Vでペーストしてpush
$ git push --set-upstream origin new-cool-feature
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 324 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)
To git@github.com:example/example-project.git
* [new branch] new-cool-feature -> new-cool-feature
Branch new-cool-feature set up to track remote branch new-cool-feature from origin.hubコマンドでプルリクエストを作成
$ hub pull-request
https://github.com/example/example-project/pull/1もしくは
$ hub browse
OR
$ gh browseでブラウザでgithub.comを開いて画面からプルリクエストを作成
関連記事
開発効率をUPする Git逆引き入門を読んだ
2014-04-23
自宅サーバのGitリポジトリをbitbucketに移行
2012-05-03