この記事の概要
GitHubでpull requestを作成する方法を記載
【想定のユースケース】
1.GitHubで開発用のリモートブランチ作成
2.eclipse(EDIツール)で上記ブランチを使用して開発
・開発ブランチの同期
・開発ブランチで開発
・ロカールリポジトリの最新化
・開発~ローカルリポジトリにcommit、リモートリポジトリにpush
3.開発用のリモートブランチから本番用のmasterブランチにmerge pull request
★この部分にフォーカス
4.各位のコメントから修正し再pull requestしOKをもらい、masterブランチにmerge
GitHubでpull requestを作成する(develop→masterへのmerge)
【操作】
GitHubで対象のリポジトリを選択後、「Pull requests」タブを押下
![](https://digital-literacy88.com/wp-content/uploads/2021/08/git-pull-req1-1024x456.png)
【操作】
「New pull request」ボタンを押下
![](https://digital-literacy88.com/wp-content/uploads/2021/08/git-pull-req2-1024x396.png)
【操作】
1.ブランチの選択
元のブランチ | マージ対象のブランチ |
base | compare |
mainブランチをプルダウンから選択 | developブランチをプルダウンから選択 |
2.「Create pull request」ボタンを押下
![](https://digital-literacy88.com/wp-content/uploads/2021/08/git-pull-req3-1024x442.png)
1.pull requestを確認する人向けへのメッセージを記載する
2.「create pull request」ボタンを押下する
![](https://digital-literacy88.com/wp-content/uploads/2021/08/git-pull-req4-1024x476.png)
【操作】
これで以下の通りdevelopブランチからmainブランチへのmergeのpull reqが作成されました。
1.「Reviewers」の歯車を押下してレビュー依頼を実施したいヒトを選択する
![](https://digital-literacy88.com/wp-content/uploads/2021/08/git-pull-req5-1024x479.png)