我在github上找到了源码。它有一些 pull 请求,指示更改代码。我想下载/克隆其中一个到我的电脑上。其 pull 请求 ID 为 3983,地址为 https://github.com/BVLC/caffe/pull/3983 谢谢大家
最佳答案
Because, someone has more one pull request, each pull request has own ID. How can I download correct version which corresponds to pull request ID
最好克隆原始仓库,然后导入 PR branch based on its ID
git clone https://github.com/BVLC/caffe
cd caffe
git remote add christianpayer https://github.com/christianpayer/caffe.git
然后,对于其中一个 christianpayer 的 merge PR 到 origin:
git fetch origin pull/3983/head:pull_3983
git checkout pull_3983
您可以从该远程仓库获取其他 PR,或添加其他远程仓库以获取其他 PR。
关于git - 如何从 pull 请求中克隆/下载代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42264017/