More than 5 years have passed since last update.
github で 空のプルリクエストを作る手順
66
Last updated at Posted at 2014-05-30
- プルリクエストは、最初に何かしら commit が必要
- 作業タスクを始めるにあたって、最初に WIP のプルリクエストを作りたいけど、commit をしないと行けない
- それが嫌なので、空の commit をして、そこからプルリクエストを育てたい
初手
$ git clone git@github.com:...
ローカルブランチ作成
$ git branch #{ブランチ名}
$ git checkout #{ブランチ名}
もしくは
$ git checkout -b #{ブランチ名}
空のコミット
$ git commit --allow-empty -m "#{プルリクエストのタイトル}"
リモートブランチに push
$ git push origin #{ブランチ名}
- push しただけだと、リモートブランチに紐付いていない
リモートブランチと紐付け
$ git branch -u origin/#{リモートブランチ名}
ローカルブランチがどのリモートブランチと紐付いているか確認
$ git branch -vv
後は、ガンガン書いて、push すべし!
参考
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
