Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9178317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:31:24+00:00 2026-06-17T17:31:24+00:00

On my local machine I removed files from folder. git init git add –all

  • 0

On my local machine I removed files from folder.

git init
git add --all

then I wrote (don’t ask me, why! 🙂 )

git rm -rf

I don’t commit, yet. Now I have empty folders in my project. In .git folder has objects with 53 Mb of files.

How can I recover my files? I’ve tried programs like Drill Disc and Stellar, but not found my files. And I can’t rollback from GIT.

How can I recover the lost files?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T17:31:25+00:00Added an answer on June 17, 2026 at 5:31 pm

    (update) Use git fsck instead, it is a builtin command for retrieving files you have once added to git repository.

    git fsck --lost-found --unreachable
    

    after the command processing, retrieved files will be placed at .git/lost-found/other, with file name of a sha256 hash. Although the original name is still lost, the content will be back.


    You can find your files in your .git/objects directory.

    Suppose there is a .git/objects/2f/ae996f8f8f9298b41ba4fdbac3d62014f9579e object, you can execute

    git cat-file -p 2fae996
    

    to get the content of your lost file.

    But I’m sorry, I have no idea about reconstructing your directory or doing this automatically.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have setup a local git on my machine. When I initialized git, I
On my local machine I am running an administrative c# service as LocalSystem called
I am having a problem on my local machine when I am doing testing.
I have smooth streaming working on my local machine. The video plays nicely and
I have a database in my local machine. I have a C# application that
I am saving some emails on my local machine using MailBee.NET Objects in htm
In web projects on my local machine, I'm using a fairly simple Sass setup.
I need to create directories in the local machine, can i do this with
I want to set subversion on my local machine, thats on my laptop. i
I built a windows service on my local machine. when I install and run

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.