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

  • SEARCH
  • Home
  • 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 8805843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T01:58:07+00:00 2026-06-14T01:58:07+00:00

I am using Git for a project. Up to yesterday night, the repository was

  • 0

I am using Git for a project.
Up to yesterday night, the repository was up and running and I shut my computer down by the end of the day as I always do.

This morning, when trying to run git status from my project folder as I always do, I get this error: fatal: not a git repository (or any of the parent directories): .git

I know that nothing happened between the moment I shut down my computer and boot it again this morning, so I’m confused about why the repository would vanish like that. It’s worth nothing that the .git folder and .gitignore file are still present in the project folder.

Now my problem here is that even if I could do a fresh checkout of the repository in a new folder, I still have code that I stashed yesterday (using git stash), including a script of SQL queries that took me several hours to write and other pieces of code I don’t even exactly remember what it is because I use stashing a lot to store unfinished work that’s not yet ready to be committed.

I searched the Internet and specifically this place and found no one having the same issue, which makes it even more strange.

  • 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-14T01:58:09+00:00Added an answer on June 14, 2026 at 1:58 am

    Obligatory question: Do you have a backup?

    If not: bad.

    If yes: Restore the backup of the repository to a different directory, check out the latest branch / commit you know you were working on, if there’s a stash in that backup as well, commit it to a new branch. Then overwrite the source files in that branch with the source files of your damaged repository. This gives you the difference of the last undamaged, backed up state and whatever you did in the meantime. You can stash it as well.

    For this very reason I normally commit early, often and push to an external repository as backup.

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

Sidebar

Related Questions

This is my first time running a project using git, so I will describe
Possible Duplicate: Using Git with an existing Xcode project Setting up a git repository
I'm using a local Git project repository, and have created a remote repository followed
I've been using Git to keep a repository of a project on a separate
I have a private .NET (C#) project using Git Repository in Unfuddle.com. I wish
I've just started using git in Vista, with my repository under /path/to/project/git repo .
We are using Git for our project. Repository is rather huge (the .git folder
I'm using git in a project with multiple branches used concurrently, that is: A
I'm using git to manage a tiny project. I've been performing all of my
I have a project that's using git. When I received the repo, it had

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.