Hacker News

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

Hi, I'm sure everyone read an article "Anyone can Access Deleted and Private Repository Data on GitHub" https://trufflesecurity.com/blog/anyone-can-access-deleted-and-private-repo-data-github.

But how to clone the repository with found deleted commit pointing to different fork repository?

Let me explain what I mean:

I found the webpage-gui providing streaming of videos: https://www.vidbinge.com/

which is based on deleted repository: https://github.com/movie-web/movie-web so I couldn't see the source code of this.

But then I remembered this article and followed it's logic I found latest scraped version of that repository on github via archive.org and then navigating to latest commit there:

https://web.archive.org/web/20240225024652/https://github.com/movie-web/movie-web/commit/c6fe62ae8acc9948bbf6c4292ebb555c006931eb

so I have a commit but I can't access it directly using github because it is deleted.

But I could find via archive.org the forks of that repository: https://web.archive.org/web/20240225024652/https://github.com/movie-web/movie-web/forks

and then I went through the list and I've tried to find the fork most recently created. And use latest commit on this repository url, and then I found this commit:

https://github.com/GustavoMelloGit/movie-web/tree/c6fe62ae8acc9948bbf6c4292ebb555c006931eb

it seems to be the latest commit I could find.

So that's cool.

But how to download clone of state of this entire repository after that commit?


githelp4 months ago

Cloning the repo, fetching at that specific commit, and then setting the current head to that commit should do the trick:

    git clone https://github.com/GustavoMelloGit/movie-web
    
    cd movie-web
    
    git fetch origin c6fe62ae8acc9948bbf6c4292ebb555c006931eb
    
    git reset --hard FETCH_HEAD

sdnewsop4 months ago

ha, indeed. Id did the trick. Thx

hn-front (c) 2024 voximity
source