Fork運用で開発をしているときに、他の人のPull Requestの内容を自分のPCにチェックアウトするコマンド。忘れがちなのでメモ。
# もしまだなら、Fork元のリポジトリをリモートリポジトリとして登録する
# git remote add upstream <Fork元のリポジトリのURL>
git fetch upstream pull/<pull request number>/head:<branch name>
git checkout <branch name>
Fork運用で開発をしているときに、他の人のPull Requestの内容を自分のPCにチェックアウトするコマンド。忘れがちなのでメモ。
# もしまだなら、Fork元のリポジトリをリモートリポジトリとして登録する
# git remote add upstream <Fork元のリポジトリのURL>
git fetch upstream pull/<pull request number>/head:<branch name>
git checkout <branch name>
Register as a new user and use Qiita more conveniently