[英]How to checkout particular pull request
I successfully cloned a git repo 我成功地克隆了一个git repo
git clone https://github.com/vimalavinisha/angular2-google-chart.git
Now I want to checkout a particular commit from this pull request . 现在我想从这个拉取请求中检出特定的提交。
Here I can get the hash of the commit 在这里,我可以得到提交的哈希值
https://github.com/vimalavinisha/angular2-google-chart/tree/3536be35189b0ea9b98633a3e2abb29796727865 https://github.com/vimalavinisha/angular2-google-chart/tree/3536be35189b0ea9b98633a3e2abb29796727865
or, the same, 或者,同样的,
https://github.com/vimalavinisha/angular2-google-chart/pull/16/commits/3536be35189b0ea9b98633a3e2abb29796727865 https://github.com/vimalavinisha/angular2-google-chart/pull/16/commits/3536be35189b0ea9b98633a3e2abb29796727865
How do I checkout this commit? 我该如何查看此提交? This command fails:
此命令失败:
git checkout 3536be35189b0ea9b98633a3e2abb29796727865
fatal: reference is not a tree: 3536be35189b0ea9b98633a3e2abb29796727865
That is simple: 这很简单:
git fetch origin refs/pull/16/head
git checkout 3536be35189b0ea9b98633a3e2abb29796727865
You can get the number of pull request from the url: 您可以从网址获取拉取请求的数量:
https://github.com/vimalavinisha/angular2-google-chart/pull/16/ https://github.com/vimalavinisha/angular2-google-chart/pull/16/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.