我在Github上找到了一份源代码。它有一些拉取请求(Pull Request),表示正在更改代码。我想要下载/克隆其中一个到我的电脑。它的拉取请求编号是3983,网址为https://github.com/BVLC/caffe/pull/3983。
谢谢。
我在Github上找到了一份源代码。它有一些拉取请求(Pull Request),表示正在更改代码。我想要下载/克隆其中一个到我的电脑。它的拉取请求编号是3983,网址为https://github.com/BVLC/caffe/pull/3983。
谢谢。
git clone https://github.com/BVLC/caffe
cd caffe
git remote add christianpayer https://github.com/christianpayer/caffe.git
然后,对于christianpayer合并到origin的一个PR:
git fetch origin pull/3983/head:pull_3983
git checkout pull_3983
1:
git clone https://github.com/christianpayer/caffe.git
cd caffe
git checkout nd-cudnn
https://github.com/christianpayer/caffe/tree/nd-cudnn
2:
git clone https://github.com/BVLC/caffe.git
cd caffe/.git
现在在config
中添加以下行:fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
[remote "origin"]
url = https://github.com/BVLC/caffe.git
fetch = +refs/heads/*:refs/remotes/origin/*
fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
$ git fetch origin
From github.com:joyent/node
* [new ref] refs/pull/5190/head -> origin/pr/5190
* [new ref] refs/pull/5193/head -> origin/pr/5193
* [new ref] refs/pull/5198/head -> origin/pr/5198
* [new ref] refs/pull/520/head -> origin/pr/520
...
$ git checkout pr/3983
Branch pr/3983 set up to track remote branch pr/3983 from origin.
Switched to a new branch 'pr/3983'
cd
命令,因此我添加了 cd caffe
。 - Avinashhttps://github.com/christianpayer/caffe.git
对应于拉取请求3983? - John