TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

How to clone by commit found via commit referencing to different fork on GitHub?

5 点作者 sdnews8 个月前
Hi, I&#x27;m sure everyone read an article &quot;Anyone can Access Deleted and Private Repository Data on GitHub&quot; https:&#x2F;&#x2F;trufflesecurity.com&#x2F;blog&#x2F;anyone-can-access-deleted-and-private-repo-data-github.<p>But how to clone the repository with found deleted commit pointing to different fork repository?<p>Let me explain what I mean:<p>I found the webpage-gui providing streaming of videos: https:&#x2F;&#x2F;www.vidbinge.com&#x2F;<p>which is based on deleted repository: https:&#x2F;&#x2F;github.com&#x2F;movie-web&#x2F;movie-web so I couldn&#x27;t see the source code of this.<p>But then I remembered this article and followed it&#x27;s logic I found latest scraped version of that repository on github via archive.org and then navigating to latest commit there:<p>https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20240225024652&#x2F;https:&#x2F;&#x2F;github.com&#x2F;movie-web&#x2F;movie-web&#x2F;commit&#x2F;c6fe62ae8acc9948bbf6c4292ebb555c006931eb<p>so I have a commit but I can&#x27;t access it directly using github because it is deleted.<p>But I could find via archive.org the forks of that repository: https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20240225024652&#x2F;https:&#x2F;&#x2F;github.com&#x2F;movie-web&#x2F;movie-web&#x2F;forks<p>and then I went through the list and I&#x27;ve tried to find the fork most recently created. And use latest commit on this repository url, and then I found this commit:<p>https:&#x2F;&#x2F;github.com&#x2F;GustavoMelloGit&#x2F;movie-web&#x2F;tree&#x2F;c6fe62ae8acc9948bbf6c4292ebb555c006931eb<p>it seems to be the latest commit I could find.<p>So that&#x27;s cool.<p>But how to download clone of state of this entire repository after that commit?

1 comment

githelp8 个月前
Cloning the repo, fetching at that specific commit, and then setting the current head to that commit should do the trick:<p><pre><code> git clone https:&#x2F;&#x2F;github.com&#x2F;GustavoMelloGit&#x2F;movie-web cd movie-web git fetch origin c6fe62ae8acc9948bbf6c4292ebb555c006931eb git reset --hard FETCH_HEAD</code></pre>
评论 #41554221 未加载