簡體   English   中英

如何結賬特定拉取請求

[英]How to checkout particular pull request

我成功地克隆了一個git repo

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

現在我想從這個拉取請求中檢出特定的提交。

在這里,我可以得到提交的哈希值

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

這很簡單:

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

您可以從網址獲取拉取請求的數量:

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM