Forwarded from 层叠 - The Cascading
由于各种原因,GitHub 用户可以从任何一个 repo 的 remote 通过类似
用户可以通过以下方式获取这段源码树:
seealso: https://github.com/github/dmca/pull/8142
seealso: https://github.com/github/dmca/tree/416da574ec0df3388f652e44f7fe71b1e3a4701f
git fetch origin [COMMIT-HASH] 的方式获取其 fork 树上的任何一个 repo 的 commit。也就是说,在 fork repo 中提交的内容可以通过在原 repo 的 remote 上进行 fetch 来获取。又由于用户不能删除 PR,一旦内容被以 PR 的形式提交,PR 中的 commit 就会一直保留。通过这样的方法,用户 Stephen304 将一份 10 月 23 日的 youtube-dl 源码树放在了 github/dmca 上。用户可以通过以下方式获取这段源码树:
git clone https://github.com/github/dmca.git && cd dmcasrc: https://news.ycombinator.com/item?id=24882921
git fetch origin 416da574ec0df3388f652e44f7fe71b1e3a4701f
git checkout 416da574ec0df3388f652e44f7fe71b1e3a4701f
seealso: https://github.com/github/dmca/pull/8142
seealso: https://github.com/github/dmca/tree/416da574ec0df3388f652e44f7fe71b1e3a4701f