Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

recover from disastrous loss of work

jeff peery January 7, 2016

Hello, 

I was working on a branch of code for the last 48 hours. didn't make any commits. And somehow was in a rebase state. I went to commit my changes and got a message in source tree asking if I wanted to abort the current rebase or continue... my trigger finger went ahead and clicked the abort (not knowing what it would do) and now I seem to have lost ALL my work.

I haven't closed any of my applications (source tree or XCode). Is there a way to recover?

 

Thanks!

5 answers

1 vote
TimP
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 7, 2016

Hi Jeff,

I can't guarantee we'll be able to recover it, but I'd be happy to pair up to give it a try. Drop me a line at tim@atlassian.com and we can get a screensharing session going.  

cheers,

Tim

Tim Crall
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 8, 2016

If you're able to recover anything, please post here describing what you did - I'm interested!

TimP
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 10, 2016

Sadly not. We checked the repository for "dangling blobs" (which often includes files that were staged but not committed) using: `git fsck | grep 'dangling blob' | awk '{ system("git --no-pager show " $3) }'` This found *some* of the missing file contents, including the headers, but Jeff had already managed to recover those from XCode. I've reached out to the SourceTree team to see if there's some secret cache or backup that it maintains, but at this point it doesn't seem likely.

0 votes
jeff peery January 8, 2016

Hi Tim,

I was able to recover only the header files. Xcode creates a products folder when you do a build, and it contains a package called your_app_name.app, and you can right click on it, navigate to it, and then right click the file to show the package contents. The package contents have many of the resources from the project, and from there I was able to recover all the header files. But, the source files are no where to be found, and I am now recreating them. I was unable to find anything useful in my local git repo.

Thanks so much for your support, and attempts to help me recover my data. I greatly appreciate it!

I have just a comment about SourceTree, I think that perhaps the abort rebase message dialog is very dangerous and the action it takes should maybe be reconsidered? I realize this was my mistake and had I known better and periodically backed up and committed I wouldn't be in this position... but, it seems that SourceTree's typical methodology for discarding work is to force the user go to each change and select to discard it or not. However, in this case, I was somehow in a rebase state with many many changes, and I went to commit the changes and the abort rebase message dialog appeared. Naively, I chose wrong, and there were serious consequences. Perhaps, aborting a rebase should not clobber all your work, but instead it should first force the user to go and manage each change?

again, thanks for your help with this matter. I do really like source tree, it is a great product... and I will now be sure to have multiple backups implemented on my machine!

Tim Crall
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 8, 2016

It's a little weird that it let you begin a rebase with uncommitted changes, as that seems like a generally bad idea to begin with. The command line won't let you do that. But yes, committing frequently is probably your best protection. I like to commit every time I get a chunk of something working, and certainly at the end of the day. If you also push your commits, you also protect yourself from losing work due to a problem with your workstation.

0 votes
jeff peery January 7, 2016

Is there a tech support line I can call?

0 votes
jeff peery January 7, 2016

Hi Tim,

no, they are not. although the built application is still running (from the code I lost). I found the header files in the product build folder, but struggling to find the source files.

0 votes
Tim Crall
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 7, 2016

Are your edits still visible in the XCode edit window?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events