0

So I have a newly created repo and I attempted to commit my newly created code but I got an error. So I ran 'git fsck' on my repo and I got this error.

broken link from    tree 9da8f3ce1355d9bdf03734d42ab15e50e5cf6361
              to    tree 64a40fc17140c1ce37720675d327d59aa9105ef1
missing tree 64a40fc17140c1ce37720675d327d59aa9105ef1

I am new to git, so I was wondering what can I do to fix this error?

Thanks!

I looked at : Git Missing Commit error and I didn't understand it.

2
  • which error did you get when you committed? and HOW did you commit? Commented Mar 13, 2012 at 10:31
  • You can try git reflog | grep 64a40f to see if it's still in the reflog. That might provide some more information, but as @eckes says, it depends on what error you got. Commented Mar 14, 2012 at 3:22

3 Answers 3

1

That error means that somehow or other, one of the object files that Git uses to store the contents of your repository history has gotten lost/corrupted.

If you just recently created the repo, I'd suggest just re-creating it (or re-cloning if you cloned it from somewhere).

Sign up to request clarification or add additional context in comments.

Comments

0

Use git add . instead of git add -A. It worked for me.

Comments

0

Try running git gc, and then push your changes.

Referral Link: https://git-scm.com/docs/git-gc

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.