LoginSignup
2
1

More than 3 years have passed since last update.

GitHubでupstreamからローカルに特定のpull requestを落とす方法

Last updated at Posted at 2020-01-09

はじめに

表題の通り。
GitHubのプルリクエストをローカルに落としたいときのコマンドが分からなかったのでメモ。
IDとブランチ名が分かればどうにかなる。
※諸々の設定は完了している前提

コマンド

$ git fetch upstream pull/{ID}/head:{branch name}

あとは $ git switch {branch name}でブランチに移動してしまえばローカルに落とせたことがわかるはず。

図解

IDとbranch nameがどこを指しているのかは下記画像を参考にしてくださいませ。
image.png

この場合は

$ git fetch upstream pull/777/head:upstream-branch

とすれば大丈夫。

2
1
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
2
1