Home > Software engineering >  Pull (rebase) deleted all files of the project
Pull (rebase) deleted all files of the project

Time:11-04

Git deleted ALL files of my project that I've been working for the last month. Basically I tried pushing my project to Github but it didn't work, so I used "Pull (rebase)" and it deleted EVERYTHING (can you seriously believe this?). Is there anything I can do? Here is a link to the full log, thankfully I have it.

https://pastebin.com/4W8PAj3M

> git show --textconv :dist/index.js
> git ls-files --stage -- D:\CODE\dist\index.js
> git cat-file -s d6cf00e78b8901535facadfd2f1b02afefe5ec2f
> git show --textconv :src/index.ts
> git ls-files --stage -- D:\CODE\src\index.ts
> git cat-file -s f0ae144245ab480bd437b97be9d58d267399b602
> git push CHANapp main

CodePudding user response:

Git didn't actually delete everything (not yet!). (The git pull command used to be able to do that, back in 2005 or so, and I did it to myself once or twice back then. I now mostly avoid git pull, for multiple reasons, not limited to this, but the lingering scars are one of the reasons.

  • Related