通过 Git 拉取 github 上的 Pull Request(PR) 到本地进行 review:
如果自己使用的就是PR提交的仓库,命令为:
git fetch origin pull/PRId/head:LocalBranchName
其中,PRId 为该 Pull Request 的序号,LocalBranchName为拉取到本地后的分支名称。
例:
git fetch origin pull/1204/head:pr1204
类似,如果自己的仓库是Clone的PR提交的仓库,则命令为:
git fetch upstream pull/PRId/head:LocalBranchName