Cloud2016
我想修改https://github.com/cosname/cosx.org/pull/1019里面文章的内容,但是没看明白你们上面讨论的东西。
我从这里git fetch origin refs/pull/771/head:patch-2
开始执行就报错了。
$ git fetch origin git@github.com:cosname/cosx.org/pull/1019/head:patch-1
fatal: invalid refspec 'git@github.com:cosname/cosx.org/pull/1019/head:patch-1'
没琢磨出来refs是什么意思,于是照着https://tighten.com/blog/adding-commits-to-a-pull-request/又鼓捣了一下,我是这么操作的:
#克隆仓库到本地
git clone git@github.com:cosname/cosx.org.git
#为了查看别人提交的PR,增加一个remote?
git remote add XiangyunHuang git@github.com:cosname/cosx.org.git
#查看分支目录
git remote -v
#看到了
`XiangyunHuang git@github.com:cosname/cosx.org.git (fetch)`
`XiangyunHuang git@github.com:cosname/cosx.org.git (push)`
#又抓取了什么?
git fetch XiangyunHuang
```
remote: Enumerating objects: 10258, done.
remote: Counting objects: 100% (936/936), done.
remote: Compressing objects: 100% (616/616), done.
remote: Total 10258 (delta 597), reused 525 (delta 289), pack-reused 9322
Receiving objects: 100% (10258/10258), 9.49 MiB | 16.00 KiB/s, done.
Resolving deltas: 100% (7973/7973), done.
From github.com:cosname/cosx.org
* [new branch] beamer-down -> XiangyunHuang/beamer-down
* [new branch] master -> XiangyunHuang/master
* [new branch] scihub -> XiangyunHuang/scihub
* [new branch] 鏇存柊澶氬閿欏埆瀛?缂栧彿 -> XiangyunHuang/鏇存柊澶氬閿欏埆瀛?缂栧彿
```
但是好像并没有把我想改的内容抓到本地,而是只是把cosname/cosx.org
的内容抓到了本地。