Recovering files from Git objects -


i obliterated work , prefer not explain how.
thing have left git objects. more recover of loss packed image files. size of object files can tell ones are. there way turn them usable files?

first thing: make backup! work on copy of backup.

if git objects still in correct directory (.git/objects/xx/xxx…) can use git fsck --full git discover them — list every object in repository. ones labeled commit , tag, ones want recover.

i use script creates branch each commit object found (e.g. increnting numbers rescue-1, rescue-2, etc.). afterwards use gitk --all visualize branches , pick top (most recent) one. create new branch there rescued-master.

checkout new master branch , run git branch --no-merge. should list of branched off commits, not contained in master. want give them new branch name too.

after you're done, delete numbered rescue- branches.

hope helps , gives a starting point.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -