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.

Cheers

Mark

2 answers

1 accepted

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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

799 views 0 4
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