如何结账特定拉取请求

时间:2017-03-08 16:44:07

标签: git github

我成功地克隆了一个git repo

git clone https://github.com/vimalavinisha/angular2-google-chart.git

现在我想查看来自此pull request的特定提交。

在这里,我可以获得提交的哈希值

https://github.com/vimalavinisha/angular2-google-chart/tree/3536be35189b0ea9b98633a3e2abb29796727865

或者,同样,

https://github.com/vimalavinisha/angular2-google-chart/pull/16/commits/3536be35189b0ea9b98633a3e2abb29796727865

如何查看此提交?此命令失败:

git checkout 3536be35189b0ea9b98633a3e2abb29796727865
fatal: reference is not a tree: 3536be35189b0ea9b98633a3e2abb29796727865

1 个答案:

答案 0 :(得分:4)

这很简单:

git fetch origin refs/pull/16/head
git checkout 3536be35189b0ea9b98633a3e2abb29796727865

您可以从网址获取拉取请求的数量:

https://github.com/vimalavinisha/angular2-google-chart/pull/16/

相关问题