1

I was able to push and pull from the git remote till yesterday. I don't know (or remember) what I did today suddenly I can't push to remote git repo. I am getting following error

$ git push
Counting objects: 83, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (16/16), done.
Writing objects: 100% (17/17), 1.32 KiB | 0 bytes/s, done.
Total 17 (delta 12), reused 0 (delta 0)
remote: fatal: unresolved deltas left after unpacking
error: unpack failed: unpack-objects abnormal exit
To //myserver/git/apps/myApp.git
! [remote rejected] master -> master (unpacker error)
error: failed to push some refs to '//myserver/git/apps/myApp.git'

And when I try to clone again I am getting error

$ Git clone //myserver/git/apps/myApp.git/
Cloning into 'MyApp'...
done.
fatal: unable to read tree 18295307f1270da3c09e3de91890652af4ff7ca8
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'

Both

git status 

and

git checkout -f HEAD

gives error

fatal: unable to read tree 18295307f1270da3c09e3de91890652af4ff7ca8

Can anyone help me understand what went wrong and how can I fix it?

Thanks

αƞjiβ
  • 3,056
  • 14
  • 58
  • 95
  • possible duplicate of [How to diagnose and fix git fatal: unable to read tree](http://stackoverflow.com/questions/20870895/how-to-diagnose-and-fix-git-fatal-unable-to-read-tree) – Makoto Nov 04 '14 at 18:49
  • I got a similar problem (while clonning the repo , not while pushing) and upon further analysis I found that I have a file with the same name in the same directory path , but different in case. Somebody pushed it from a linux dev machine and I was trying to clone it into windows. – Ajay Nov 04 '14 at 18:56
  • I clone in new fresh directory and still same fatal error. – αƞjiβ Nov 04 '14 at 19:00

1 Answers1

1

So I solved this issue. Luckily my remote repo is up to date with no error. With verify object command

git fsck --full

I saw the dangling tree. So I wen to the server and copy those missing object to my local copy. With continuous check and copy I am able to bring all missing object and finally able to push. Evey thing is up to date now.

Reason to corrupt my local copy may be I delete the branch. Which I have done.

αƞjiβ
  • 3,056
  • 14
  • 58
  • 95