I obliterated all my work and would prefer not to explain how.
The only thing I have left are the git objects. More then anything I would like to recover some of the loss packed Image files. From the size of the object files I can tell which ones they are. Is there a way to turn them back into usable files?

- 246,190
- 53
- 318
- 364

- 24,551
- 17
- 53
- 78
-
1only git objects? no refs/branches/tags? first thing: backup – knittl Jul 01 '11 at 08:07
1 Answers
first thing: make a backup! then work on a copy of that backup.
if the git objects are still in the correct directory (.git/objects/xx/xxx…
) you can use git fsck --full
for git to discover them — it will probably list every object in your repository. now look for the ones labeled commit
and tag
, those are the ones you want to recover.
i would probably use a script which creates a branch for each commit object found (e.g. simply increnting numbers rescue-1
, rescue-2
, etc.). afterwards use gitk --all
to visualize all your branches and pick the top (most recent) one. create a new branch there rescued-master
.
checkout your new master branch and run git branch --no-merge
. you should get a list of branched off commits, not contained in master. you probably want to give them a new branch name too.
after you're done, delete all the numbered rescue-
branches.
hope that helps and gives a a starting point.

- 246,190
- 53
- 318
- 364