SourceTree reports Not a GIT Repo

git status' failed with code 128:'fatal: Not a git repository (or any of the parent directories): .git.

What happened? This repo has existed for over a year. Just a few minutes ago I went to checkin my first changes in 3 days and I get this message. The .git folder is at the top of the parent folder (training materials). Besides hyperventaliting - what do I next?

Looking forward to recovering my repo.

FYI I get this is really the command line reporting the issue.



2 answers

1 accepted

1 vote
Accepted answer

Have you navigated to the directory in a command shell and run "git status" there?
Is there a remote repository you could clone, and manually merge in changes from your failed copy?

Fair point. The good news - its consist. GIT status reports the same error. The bad news - I'm on the road running trainings for the next two weeks. Must not take risks.

Ugh the ./git folder was completely corrupted. Not even restoring from a backup 3 days before (when I had a good checkin helped). Had to create a new copy of the repo from scratch.

Whilst not a sourcetree problem likely it was an ugly issue.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

1,127 views 4 2
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you