TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

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

5 pointsby sdnews8 months ago
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 months ago
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 未加载