views:

245

answers:

2

Hi everyone,

I've made a pretty stupid mistake with a git repository and lost some files I really need.

I thought I added all new files to the repo before I commited the change to the current branch (didn't happen though). Then I created a new branch and deleted these files again from the new branch within TextMate with "move to trash". I switched branches couple of times with the 'checkout' command. Later, I tried to restore these files from trash but there were none..

I've tried several options to recover the files including 'git fsck --lost-found' but it appears that they've never been registered in the repo.

Is there any option left to recover unadded/uncommited files that were deleted from the hard drive? does OSX provide some sort of recovery for that?

Thanks so much!

+1  A: 

You might be out of luck, but it seems strange that the files aren't there. It seems like files stay in my trash for a couple of weeks, unless it has been that long for you or manually emptied it.

One thing you could try is going to .Trash in your home dir with the terminal and running an ls -al This might uncover the files if they're hidden for some strange reason.

Aside from that, you would have to contact a data recovery service in your area, and I'm not sure of the odds of success that the files could be recovered that way.

Dana the Sane
yeah. Got them all back!This is sooo awesome.. thanks a lot Dana :)
No problem, just a wild guess.
Dana the Sane
A: 

If you are running Time Machine on Leopard (OS X 10.5) then you have a chance that the files are in the backup. By default Time Machine backs up every hour so unless the files were created and deleted between backups then you should have something.

Mark Thalman